timer

package
v0.0.2-0...-9a6aa9e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration interface {
	Value() int64
}

func NewDuration

func NewDuration(value int64) (Duration, error)

type Timer

type Timer interface {
	Start(mode TimerMode, duration Duration)
	Stop()
}

func NewTimer

func NewTimer() Timer

type TimerFinished

type TimerFinished interface {
	event.Event
	Mode() TimerMode
}

func NewTimerFinished

func NewTimerFinished(mode TimerMode) TimerFinished

type TimerMode

type TimerMode uint
const (
	TimerModeTask TimerMode = iota
	TimerModeBreaks
)

func (TimerMode) String

func (i TimerMode) String() string

type TimerTicked

type TimerTicked interface {
	event.Event
	Mode() TimerMode
}

func NewTimerTicked

func NewTimerTicked(mode TimerMode) TimerTicked

Jump to

Keyboard shortcuts

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