timers

package
v0.0.0-...-c0334d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnitTest_TimedTask

func UnitTest_TimedTask()

Types

type TimeRecorder

type TimeRecorder struct {
	sync.Mutex
	BeginTime time.Time
	// contains filtered or unexported fields
}

func NewTimeRecorder

func NewTimeRecorder() *TimeRecorder

func (*TimeRecorder) Begin

func (this *TimeRecorder) Begin(formatPrefix string)

func (*TimeRecorder) End

func (this *TimeRecorder) End()

type TimedTask

type TimedTask struct {
	// contains filtered or unexported fields
}

func SetInterval

func SetInterval(duration time.Duration, callback TimedTaskCallback) *TimedTask

add interval task.

func SetTimeout

func SetTimeout(duration time.Duration, callback TimedTaskCallback) *TimedTask

add timeout task.

func (*TimedTask) Reset

func (this *TimedTask) Reset()

func (*TimedTask) Stop

func (this *TimedTask) Stop()

type TimedTaskCallback

type TimedTaskCallback func()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL