timer

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackFn

type CallbackFn func(dt time.Duration)

type Id

type Id = string

type Manager

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

func New

func New() *Manager

func (*Manager) Add

func (m *Manager) Add(now, endAt time.Time, callback CallbackFn, execCount int, id ...Id) Id

func (*Manager) Len

func (m *Manager) Len() int

func (*Manager) NextUpdateAt

func (m *Manager) NextUpdateAt() (at time.Time)

func (*Manager) Remove

func (m *Manager) Remove(id Id, softRemove ...bool)

func (*Manager) Update

func (m *Manager) Update(now time.Time) time.Duration

Jump to

Keyboard shortcuts

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