Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock is generally only used for testing, but could be used for userspace clock-synchronization as well.
func DefaultClock ¶
func DefaultClock() Clock
DefaultClock returns a clock that minimally wraps the `time` package
type FakeClock ¶
FakeClock implements the Clock interface, with helpful primitives for testing and skipping through timestamps without having to actually sleep in the test. (wrapping github.com/vimeo/go-clocks/fake.Clock)
func NewFakeClock ¶
NewFakeClock returns an initialized FakeClock instance.
type OffsetClock ¶
OffsetClock wraps another clock, adjusting time intervals by a constant offset. (useful for simulating clock-skew) (forwarding alias for github.com/vimeo/go-clocks/offset.Clock
func NewOffsetClock ¶
func NewOffsetClock(inner Clock, timeOffset time.Duration) *OffsetClock
NewOffsetClock creates an OffsetClock and returns it