timer

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2016 License: Apache-2.0 Imports: 6 Imported by: 226

README

goTimer

Timer framework in Golang

Documentation

Index

Constants

View Source
const (
	MIN_TIMER_INTERVAL = 1 * time.Millisecond
)

Variables

This section is empty.

Functions

func AddCallback

func AddCallback(d time.Duration, callback CallbackFunc) *timer

Add a callback which will be called after specified duration

func AddTimer

func AddTimer(d time.Duration, callback CallbackFunc) *timer

Add a timer which calls callback periodly

func StartTicks

func StartTicks(tickInterval time.Duration)

Start the self-ticking routine, which ticks per tickInterval

func Tick

func Tick()

Tick once for timers

Types

type CallbackFunc

type CallbackFunc func()

Type of callback function

Jump to

Keyboard shortcuts

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