Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task runs a function at fixed duration.
func New ¶ added in v0.4.6
New returns a new task for use. fn is main function which will called in task loop. By default, its duration is 1min, and you can change it by Duration().
func (*Task) Context ¶ added in v0.4.6
Context sets ctx to task which will be passed to its functions in order to control context.
Click to show internal directories.
Click to hide internal directories.