tick

package
v0.0.0-...-22306b7 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TicksPerSeconds = 60

Variables

This section is empty.

Functions

func Seconds

func Seconds(ticks uint) uint

func SecondsCeil

func SecondsCeil(ticks uint) uint

Types

type Ticker

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

func NewTicker

func NewTicker() *Ticker

func (*Ticker) Every

func (t *Ticker) Every(ticks uint) bool

func (*Ticker) NewTimer

func (t *Ticker) NewTimer() *Timer

func (*Ticker) StartTimer

func (t *Ticker) StartTimer(duration uint) *Timer

func (*Ticker) Update

func (t *Ticker) Update()

func (*Ticker) Wait

func (t *Ticker) Wait(ticks uint, ids ...uintptr) bool

type Timer

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

func (*Timer) IsStarted

func (t *Timer) IsStarted() bool

func (*Timer) Reset

func (t *Timer) Reset(duration uint)

func (*Timer) Stop

func (t *Timer) Stop()

func (*Timer) TimeLeft

func (t *Timer) TimeLeft() uint

func (*Timer) Wait

func (t *Timer) Wait() bool

Jump to

Keyboard shortcuts

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