timer

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 2 Imported by: 65

Documentation

Index

Constants

View Source
const (
	Stopped timerState = iota
	Started
	Paused
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Setter

type Setter interface {
	Set(int64)
}

A variable that is settable. The use of this interface allows for control on how the averaged timed value accessed.

type Timer

type Timer interface {
	// Start the timer
	// Timer must be stopped, which is the state of a new timer.
	Start()
	// Pause the timer.
	// Timer must be started.
	Pause()
	// Resumed the timer.
	// Timer must be paused.
	Resume()
	// Stop the timer.
	// Timer must be started.
	Stop()
}

func New

func New(sampleRate float64, movingAverageSize int, avgVar Setter) Timer

func NewNoOp

func NewNoOp() Timer

Jump to

Keyboard shortcuts

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