Documentation ¶
Overview ¶
Package clock provides an interface for clocks.
This is useful for testing code which checks does things based on time; it allows advancing the clock as needed by the tests, rather than needing to race with real time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
A Clock can measure time.
var System Clock = systemClock{}
System reads the current time from the system clock.
type Manual ¶
type Manual struct {
// contains filtered or unexported fields
}
A Manual is a clock which is stopped, and only advances when its Advance method is called.
Click to show internal directories.
Click to hide internal directories.