timer

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 3 Imported by: 0

README

定时 timer 简要说明

add by stefan 20190710 15:56

定时器主要用在时间流逝,于一个常规的时间生态圈中,在同一个入口处理事件,事件处理可以是其他的或者是原来的

use: 定时器使用时,需要注意,在不使用定时器任务时,则在离线时,删掉定时器,节省服务器压力和内存效率,只需要在玩家登陆时,注册进去即可,另外,尽可能的能够准确的计算出定时所需间隔时间,1: 固定时刻时分秒会做某件事的,则可计算回调时间数值设置间隔时间段; 2: 不定时间内的数据刷新,则采用固定的时间间隔,提前设置按照流程走,到时间就进行回调。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type TAokoTimer

type TAokoTimer struct {
	Func     refect.Value
	Params   []reflect.Value
	Interval int
	Count    int
	// contains filtered or unexported fields
}

type TAokoTimerMgr

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

Jump to

Keyboard shortcuts

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