cycletimer

package module
v0.0.0-...-9e742d4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

README

cycle-timer

a timer cycle queue to resolve application whitch need too much timer

use

go get github.com/subing/cycletimer

example

import (
    timer "github.com/subing/cycletimer"
)
c := timer.NewTicker()
_, ok := <-c
if !ok {
	fmt.Println("close c")
	return
}

Documentation

Overview

Package cycletimer 批量定时器

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(tc CycleTicker)

func Start

func Start(interval int)

Start 启动定时器

func Stop

func Stop()

Stop 结束定时器

Types

type CycleTicker

type CycleTicker struct {
	Index int
	C     chan string
}

func NewTicker

func NewTicker() CycleTicker

NewTicker 创建定时器

Jump to

Keyboard shortcuts

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