tickers

package
v0.0.0-...-93368d4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2015 License: MIT Imports: 2 Imported by: 3

Documentation

Overview

Package tickers implements a goroutine-safe ticker list.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tickers

type Tickers struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Tickers is a simple goroutine-safe ticker list.

func New

func New() Tickers

func (Tickers) AddTicker

func (l Tickers) AddTicker(id int32, t tick.Ticker)

AddTicker adds a ticker to the list.

func (Tickers) Copy

func (l Tickers) Copy() map[int32]tick.Ticker

Copy returns a copy of the list.

func (Tickers) GetTicker

func (l Tickers) GetTicker(id int32) tick.Ticker

GetTicker gets a ticker from the list by its Entity Id.

func (Tickers) Len

func (l Tickers) Len() int

Len returns the number of active tickers.

func (Tickers) RemTicker

func (l Tickers) RemTicker(id int32)

RemTicker removes a ticker from the list.

func (Tickers) TickAll

func (l Tickers) TickAll(tick int64)

TickAll calls each ticker's Tick method.

Jump to

Keyboard shortcuts

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