Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SleepCT ¶
type SleepCT struct {
// contains filtered or unexported fields
}
SleepCT - Sleep constant time step crates a sleep based ticker. designed to maintain a consistent sleep/tick interval. The sleeper can be paused waiting to be signaled from another go routine. This allows for the pausing of loops that do not have work to complete
func (*SleepCT) Notify ¶ added in v0.5.0
func (s *SleepCT) Notify()
Notify attempts to resume a paused sleeper. It is safe to call notify from other processes and as often as desired.
func (*SleepCT) SleepNextTarget ¶
Sleep to the next target duration. If pause it set to true will sleep the duration and wait to be notified. The notification channel will be cleared when the thread wakes. SleepNextTarget should not be call more than once concurrently.
Click to show internal directories.
Click to hide internal directories.