delay

package
v0.0.0-...-c314f80 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delay

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

func New

func New() *Delay

func (*Delay) Add

func (d *Delay) Add(delayTime time.Duration, f func(ts int64, args interface{}), arg interface{}) int64

func (*Delay) Del

func (d *Delay) Del(f func(ts int64, args interface{}) bool)

func (*Delay) Done

func (d *Delay) Done() <-chan time.Time

func (*Delay) Handler

func (d *Delay) Handler()

func (*Delay) QueueAdd

func (d *Delay) QueueAdd(unit *Unit)

func (*Delay) QueueLen

func (d *Delay) QueueLen() int

func (*Delay) QueueRange

func (d *Delay) QueueRange(f func(unit *Unit) bool)

func (*Delay) QueueRangeDel

func (d *Delay) QueueRangeDel(f func(unit *Unit) (bool, bool))

func (*Delay) Range

func (d *Delay) Range(f func(ts int64, args interface{}) bool)

type Unit

type Unit struct {
	DelayTime time.Duration
	CallTs    int64
	F         func(ts int64, arg interface{})
	Arg       interface{}
}

Jump to

Keyboard shortcuts

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