time2

package
v0.0.0-...-bdc7756 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 2 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

func Sleep

func Sleep(d time.Duration)

func Tick

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

Types

type Ticker

type Ticker struct {
	C <-chan time.Time
	// contains filtered or unexported fields
}

func NewTicker

func NewTicker(d time.Duration) *Ticker

func TickFunc

func TickFunc(d time.Duration, f func()) *Ticker

func (*Ticker) Reset

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

func (*Ticker) Stop

func (t *Ticker) Stop()

type Timer

type Timer struct {
	C <-chan time.Time
	// contains filtered or unexported fields
}

func AfterFunc

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

func NewTimer

func NewTimer(d time.Duration) *Timer

func (*Timer) Reset

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

func (*Timer) Stop

func (t *Timer) Stop()

type Wheel

type Wheel struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewWheel

func NewWheel(tick time.Duration) *Wheel

tick is the time for a jiffies

func (*Wheel) After

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

func (*Wheel) AfterFunc

func (w *Wheel) AfterFunc(d time.Duration, f func()) *Timer

func (*Wheel) NewTicker

func (w *Wheel) NewTicker(d time.Duration) *Ticker

func (*Wheel) NewTimer

func (w *Wheel) NewTimer(d time.Duration) *Timer

func (*Wheel) Sleep

func (w *Wheel) Sleep(d time.Duration)

func (*Wheel) Stop

func (w *Wheel) Stop()

func (*Wheel) Tick

func (w *Wheel) Tick(d time.Duration) <-chan time.Time

func (*Wheel) TickFunc

func (w *Wheel) TickFunc(d time.Duration, f func()) *Ticker

Jump to

Keyboard shortcuts

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