native

package
v0.0.11-otel Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Timer

type Timer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTimer

func NewTimer() *Timer

func (*Timer) Add

func (t *Timer) Add(opType timer.OpType, id int64, delay time.Duration) error

func (*Timer) Get

func (t *Timer) Get(opType timer.OpType, id int64) *timer.OperationItem[int64]

func (*Timer) GetAll

func (t *Timer) GetAll() []*timer.OperationItem[int64]

func (*Timer) Register

func (t *Timer) Register(opType timer.OpType, handler func(id int64))

func (*Timer) Remove

func (t *Timer) Remove(opType timer.OpType, id int64) error

func (*Timer) Start

func (t *Timer) Start()

func (*Timer) Stop

func (t *Timer) Stop()

Jump to

Keyboard shortcuts

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