particletimer

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIMER_LEVEL = uint(48) // 时间段最大分级,最大时间段为 2^TIMER_LEVEL
	TICK_TIME   = 10       // 10 ms
)

Variables

This section is empty.

Functions

func Add

func Add(id int64, timeout int64, ch chan int64) int64

添加一个定时事件,timeout为到期的修正UTC时间 毫秒 id 是调用者定义的编号(请使用唯一id生成器生成), 事件发生时,会把id发送到ch

func Close

func Close()

func Closed

func Closed() bool

func Current

func Current() int64

当前修正 UTC时间 毫秒

func Del

func Del(id int64)

删除指定id的定时事件

func ParticleTimerExist

func ParticleTimerExist(id int64) bool

func ParticleTimerInfo

func ParticleTimerInfo(ptid int64) (bool, int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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