timer

package
v0.0.0-...-214a605 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTimer

func RegisterTimer(name string, t timerCreator)

Types

type Cancel

type Cancel func()

type OnTimeOut

type OnTimeOut func(time.Time)

OnTimeOut 是定时器的callback

type Timer

type Timer interface {
	Run()
	Stop()

	SetPool(pool.Pool)
	AddTimer(expire time.Time, interval time.Duration, cb OnTimeOut) Cancel

	String() string
}

func MustGetTimer

func MustGetTimer(name string) Timer

Directories

Path Synopsis
plugins

Jump to

Keyboard shortcuts

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