Documentation
¶
Overview ¶
Package fakeclock is a deterministic clock for tests. Time moves only when a test calls Advance, which runs due timers synchronously in the caller's goroutine. Clock satisfies plugin.Clock without importing the plugin package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock is a manually advanced clock.
func (*Clock) Advance ¶
Advance moves the clock forward by d, running every timer that becomes due, earliest first. A callback may schedule new timers, which run too when due.
Click to show internal directories.
Click to hide internal directories.