timer

package
v0.0.0-...-d62e3dc Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestroyMessageTimeout

func DestroyMessageTimeout(m *MessageTimeout)

Types

type Callback

type Callback func(ctx sadefine.Context, id ID, tag Tag)

type ID

type ID = uint64

type Manager

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

func NewManager

func NewManager(rootContext *sadefine.RootContext, pid *sadefine.PID) *Manager

func (*Manager) NewLoopTimer

func (m *Manager) NewLoopTimer(dur time.Duration, tag Tag, callback Callback) ID

func (*Manager) NewTimer

func (m *Manager) NewTimer(dur time.Duration, tag Tag, callback Callback) ID

func (*Manager) Stop

func (m *Manager) Stop(id ID) error

func (*Manager) StopAll

func (m *Manager) StopAll()

func (*Manager) Trigger

func (m *Manager) Trigger(ctx sadefine.Context, id ID) error

type MessageTimeout

type MessageTimeout struct {
	ID  ID
	Tag Tag
}

func CreateMessageTimeout

func CreateMessageTimeout(id ID, tag Tag) *MessageTimeout

type Tag

type Tag = uint64

func NextTag

func NextTag() Tag

Jump to

Keyboard shortcuts

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