timeutil

package
v0.0.0-...-130f5e9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2018 License: Apache-2.0 Imports: 4 Imported by: 9

Documentation

Overview

Copyright (c) 2015-2018 All rights reserved. 本软件源代码版权归 my.oschina.net/tantexian 所有,允许复制与学习借鉴. Author: tantexian, <tantexian@qq.com> Since: 2017/08/09

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentTimeMillis

func CurrentTimeMillis() int64

NowMilliseconds 当前时间毫秒数 Author rongzhihong Since 2017/9/5

func NowTimestamp

func NowTimestamp() int64

Types

type Ticker

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

func NewTicker

func NewTicker(wait bool, delay, period time.Duration, fn func()) *Ticker

func (*Ticker) Start

func (t *Ticker) Start()

func (*Ticker) Stop

func (t *Ticker) Stop() bool

Stop stop ticker

type Tickers

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

Tickers 定时器管理

func NewTickers

func NewTickers() *Tickers

NewTickers 创建定时器管理

func (*Tickers) Close

func (ts *Tickers) Close() error

Close 关闭定时器

func (*Tickers) Get

func (ts *Tickers) Get(key string) *Ticker

Get 取得定时器

func (*Tickers) Register

func (ts *Tickers) Register(key string, t *Ticker) error

Register 注册一个定时器

func (*Tickers) Remove

func (ts *Tickers) Remove(key string) error

Remove 移除定时器

func (*Tickers) Start

func (ts *Tickers) Start()

Start 开启所有定时器

Jump to

Keyboard shortcuts

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