// Package clock abstracts time source.
package clock import ( ) // Clock is current time source. type Clock interface { Now() time.Time Timer(d time.Duration) Timer Ticker(d time.Duration) Ticker } // Timer abstracts a single event. type Timer = neo.Timer // StopTimer stops timer and drains timer channel if Stop() returned false. func ( Timer) { if !.Stop() { select { case <-.C(): default: } } } // Ticker abstracts a channel that delivers “ticks” of a clock at intervals. type Ticker = neo.Ticker