Documentation
¶
Overview ¶
Package clock provides the emulator's clock: real by default, a fake advanceable clock under --deterministic or `gcpemu time advance` (NFR-REL-002).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fake ¶
Fake is a deterministic clock that starts at a fixed instant and ticks forward by Step on every call to Now.
type Offset ¶
type Offset struct {
// contains filtered or unexported fields
}
Offset is a real clock that can be advanced for lifecycle/TTL tests.
type Stopwatch ¶ added in v0.6.0
type Stopwatch struct {
// contains filtered or unexported fields
}
Stopwatch times short intervals such as a loopback round trip. Go's monotonic clock on Windows advances only every ~0.5ms, so a fast hop timed with time.Since reads as zero there; Stopwatch reads a high-resolution counter instead.
func StartStopwatch ¶ added in v0.6.0
func StartStopwatch() Stopwatch
StartStopwatch starts a Stopwatch now.