Documentation
¶
Index ¶
Constants ¶
View Source
const ( B Bytes = iota KB = 1 << (10 * iota) MB GB TB )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeprecationError ¶
type DeprecationError struct{}
func (DeprecationError) Error ¶
func (d DeprecationError) Error() string
type Ticker ¶
type Ticker struct { // Duration represents frequently the ticker should tick Duration time.Duration // Ticks are sent down this channel C <-chan time.Time // If set to true, a tick is sent down the channel immediately InstaTick bool // contains filtered or unexported fields }
Ticker behaves like time.Ticker, but also supports stopping and restarting without destroying the initial ticker, as well as sending the first tick immediately
func NewTicker ¶
NewTicker returns a new Ticker which ticks repeatedly at the given duration. If insta is set to true, it will send a tick down its' channel on instantiation
func (*Ticker) Kill ¶
func (t *Ticker) Kill()
Kill kills the ticker, preventing it from being started again. The Ticker will panic if Start() is called after Kill() Kill may be called when the ticker is in any state (other than killed)
Click to show internal directories.
Click to hide internal directories.