Documentation
¶
Overview ¶
Package clock abstracts time so that embedded targets can inject a hardware RTC or monotonic counter, and tests can use a deterministic fake clock.
All server and BMC state-machine code must obtain time exclusively through this interface – never via time.Now directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface {
Now() time.Time
NewTimer(d time.Duration) Timer
NewTicker(d time.Duration) Ticker
}
Clock provides the current time and factory methods for timers/tickers.
type Ticker ¶
Ticker mirrors the relevant subset of time.Ticker.
Click to show internal directories.
Click to hide internal directories.