Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeMachine ¶
type TimeMachine struct {
// contains filtered or unexported fields
}
var Machine TimeMachine
func (*TimeMachine) AddTimePoint ¶
func (tm *TimeMachine) AddTimePoint(tp TimePoint)
func (*TimeMachine) Init ¶
func (tm *TimeMachine) Init()
func (*TimeMachine) Start ¶
func (tm *TimeMachine) Start()
func (*TimeMachine) Stop ¶
func (tm *TimeMachine) Stop()
type TimePoint ¶
type TimePoint struct { Point time.Time // the point in time when the Action should be triggered WaitTime time.Duration // the effective waiting time IsRepetable func() bool // should determine if the action should be repeated Action func() // the logic that should be done when the point in time is triggered }
Click to show internal directories.
Click to hide internal directories.