internal

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafeTimer

type SafeTimer struct {
	*time.Timer
	// contains filtered or unexported fields
}

This code is based on the following resources: source code: https://play.golang.org/p/Ys9qqanqmU discuss: https://groups.google.com/forum/#!msg/golang-dev/c9UUfASVPoU/tlbK2BpFEwAJ

func NewSafeTimer

func NewSafeTimer(d time.Duration) *SafeTimer

func (*SafeTimer) SafeReset

func (t *SafeTimer) SafeReset(d time.Duration) bool

重置定时器

func (*SafeTimer) Scr

func (t *SafeTimer) Scr()

saw channel read,在drain timer对应的ch后一定要调用

Jump to

Keyboard shortcuts

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