timers

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debouncer

type Debouncer struct {
	OnExit func()
	// contains filtered or unexported fields
}

Debouncer struct to support debouncing

func NewDebounce

func NewDebounce(interval time.Duration, action func(arg interface{})) *Debouncer

NewDebounce creates a new Debouncer

func (*Debouncer) Delay

func (d *Debouncer) Delay(item interface{})

Delay delays the execution of action declared when we created the debouncer

func (*Debouncer) Kill

func (d *Debouncer) Kill()

Kill terminates the debouncer

type Ticker

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

func NewDelayedTicker

func NewDelayedTicker(delay time.Duration, duration time.Duration, hnd func(time.Time)) *Ticker

func NewTicker

func NewTicker(duration time.Duration, hnd func(time.Time)) *Ticker

func (*Ticker) Stop

func (tck *Ticker) Stop()

Jump to

Keyboard shortcuts

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