Documentation
¶
Overview ¶
Package clock offers a more object-oriented interface to the time package from the standard library in the form of "Clocks", allowing greater control over the flow of time. Clocks also enable isolation between individually configurable instances, analogous to [rand]'s alternative interface via instances of [rand.Rand]. Each Clock instance may track its own flow of time, appropriately triggering Timers and Tickers created with them. There are several implementations supplied by subpackages.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mocktime provides a drop in replacement for time that starts at a fixed epoch and may be controlled as a relative clock.
|
Package mocktime provides a drop in replacement for time that starts at a fixed epoch and may be controlled as a relative clock. |
|
Package realtime provides a thin wrapper around the time package.
|
Package realtime provides a thin wrapper around the time package. |
|
Package relativetime provides a clock that can be set to track a reference clock with a specified offset and scaling factor, and may start, stop, or adjust tracking parameters while running.
|
Package relativetime provides a clock that can be set to track a reference clock with a specified offset and scaling factor, and may start, stop, or adjust tracking parameters while running. |
|
Package steppedtime provides a simple clock and time implementation starting at zero and counting upwards.
|
Package steppedtime provides a simple clock and time implementation starting at zero and counting upwards. |
Click to show internal directories.
Click to hide internal directories.