timer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimerNotWaited = errors.New("timer not waited, cannot cancel")
View Source
var ErrTimerWaited = errors.New("timer aleready waited, cannot wait twice")

Functions

This section is empty.

Types

type MockCbTimer

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

TIMER WITH LOCK PROTECTION

func (*MockCbTimer) Cancel

func (t *MockCbTimer) Cancel() error

func (*MockCbTimer) ForceDone

func (t *MockCbTimer) ForceDone() error

func (*MockCbTimer) WaitCb

func (t *MockCbTimer) WaitCb(d time.Duration, cb func()) error

type PomoTimer

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

TIMER WITH LOCK PROTECTION

func (*PomoTimer) Cancel

func (t *PomoTimer) Cancel() error

func (*PomoTimer) WaitCb

func (t *PomoTimer) WaitCb(d time.Duration, cb func()) error

type PomoTimerIface

type PomoTimerIface interface {
	WaitCb(d time.Duration, cb func()) error
	Cancel() error
}

Jump to

Keyboard shortcuts

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