timer

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func After

func After(d time.Duration) <-chan time.Time

Types

type Timer

type Timer interface {
	Done() <-chan time.Time
	Stop()
	Reset(d time.Duration)
}

func AfterFunc

func AfterFunc(d time.Duration, f func()) Timer

func NewTimer

func NewTimer(d time.Duration) Timer

func NewWrapper

func NewWrapper(t *time.Timer) Timer

type Wrapper

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

Wrapper for time.Timer.

func (*Wrapper) Done

func (t *Wrapper) Done() <-chan time.Time

func (*Wrapper) Reset

func (t *Wrapper) Reset(d time.Duration)

func (*Wrapper) Stop

func (t *Wrapper) Stop()

Jump to

Keyboard shortcuts

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