Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
TestRecentTimeLocal is like TestTimeLocal, but in the recent past.
TestRecentTimeUTC is like TestTimeUTC, but in the recent past.
TestTimeLocal is an arbitrary time point in the 'Local' time zone for testing.
It corresponds to a negative Unix timestamp, so it might be inappropriate for some tests. Use 'TestRecentTimeLocal' for more "real" test time in this case.
TestTimeUTC is an arbitrary time point in UTC for testing.
It corresponds to a negative Unix timestamp, so it might be inappropriate for some tests. Use 'TestRecentTimeUTC' for more "real" test time in this case.
Functions ¶
func GetTags ¶
GetTags returns the tags associated with the specified timer. If the timer has no tags, an empty slice (nil) will be returned.
Types ¶
type TestClock ¶
type TestClock interface { clock.Clock // Set sets the test clock's time. Set(time.Time) // Add advances the test clock's time. Add(time.Duration) // SetTimerCallback is a goroutine-safe method to set an instance-wide // callback that is invoked when any timer begins. SetTimerCallback(TimerCallback) }
TestClock is a Clock interface with additional methods to help instrument it.
func New ¶
New returns a TestClock instance set at the specified time.