Documentation
¶
Overview ¶
Package sleepable implements a timer that can trigger at or soon after a given time and supports the computer going to sleep while the timer is waiting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxSleepTime = 15 * time.Second
MaxSleepTime is the maximum duration the timer will sleep in one interval. Can be overridden for testing.
Functions ¶
This section is empty.
Types ¶
type Timer ¶
type Timer struct {
C <-chan struct{}
// contains filtered or unexported fields
}
Timer is a timer that can trigger at or soon after a given time and supports the computer going to sleep while the timer is waiting.
Click to show internal directories.
Click to hide internal directories.