Documentation
¶
Overview ¶
Package clock provides the timing source a pipeline uses for presentation timestamps and elapsed-time measurements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface {
// Start fixes the clock's reference point. It must be called before Time.
Start()
// Time is the elapsed time since Start. It is 0 before Start is called.
Time() time.Duration
}
Clock is a timing source for a pipeline. Start fixes the reference point and Time reports the elapsed time since then. The unit and reference are defined by the implementation.
type System ¶
type System struct {
// contains filtered or unexported fields
}
System is a monotonic Clock backed by the host's monotonic time, so it is unaffected by wall-clock adjustments. The zero value is not usable; build one with NewSystem. It is safe for concurrent use.
func NewSystem ¶
func NewSystem() *System
NewSystem returns a System clock that has not been started yet.
Click to show internal directories.
Click to hide internal directories.