timerDeal

package
v0.0.0-...-2a383cf Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnDealTimeOut

func OnDealTimeOut(t time.Duration, fun mydef.ParamsCallFunc, parms ...interface{})

超时回调 t:超时时间 fun:回调接口 args:回调接口传入的参数

func OnPeDay

func OnPeDay(hour, min, sec int, callback func())

每天事件 hour, min, sec : 几点(当天的0点偏移秒数) callback : 时间回调

func OnPeHour

func OnPeHour(min, sec int, callback func())

每小时事件 min, sec : 几分(当天的0点偏移秒数) callback : 时间回调

func OnPeMonth

func OnPeMonth(day int, hour, min, sec int, callback func())

每月事件 day : 几号 hour, min, sec : 几点(当天的0点偏移秒数) callback : 时间回调

Types

type TimerDeal

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

func (*TimerDeal) AddOneCall

func (t *TimerDeal) AddOneCall(f func())

增加一个回调

func (*TimerDeal) OnSart

func (t *TimerDeal) OnSart()

func (*TimerDeal) SetCallBackTimer

func (t *TimerDeal) SetCallBackTimer(d time.Duration)

设置超时时间

Jump to

Keyboard shortcuts

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