Documentation ¶
Overview ¶
Package mclock is a wrapper for a monotonic clock source
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock interface { Now() AbsTime Sleep(time.Duration) After(time.Duration) <-chan time.Time AfterFunc(d time.Duration, f func()) Event }
Clock interface makes it possible to replace the monotonic system clock with a simulated clock.
type Event ¶
type Event interface {
Cancel() bool
}
Event represents a cancellable event returned by AfterFunc
type System ¶
type System struct{}
System implements Clock using the system clock.
type SystemEvent ¶
SystemEvent implements Event using time.Timer.
Click to show internal directories.
Click to hide internal directories.