Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// The TargetID will be automatically removed after Timeout duration, if not zero.
// The timer starts when the delete button is rendered.
Timeout time.Duration
// The optional ticker step, 1s by default
// Ignored if 0 or greater than the timeout
TickerStep time.Duration
// The function to call at every ticker step. Set nil to ignore ticker.
// TODO: clock - make tic a parameter of Start
Tic func(*Clock)
// contains filtered or unexported fields
}
Clock provides a timer and a ticker with possibility to add callback functions at every tic and at the end of the timer.
func (*Clock) Start ¶
func (_clock *Clock) Start(_finished func())
Start starts the timer and the ticker, according to Timeout and TickerStep properties.
Click to show internal directories.
Click to hide internal directories.