timing

package
v0.0.0-...-86701fc Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Initialize

func Initialize()

Initialize sets up the AVR timer interrupt to track time. It must be called before using Wait() or WaitForSecond()

func Wait

func Wait(wait uint8)

Wait waits for up to 256 ticks

Types

type TimeUnit

type TimeUnit uint32

func WaitForSecond

func WaitForSecond() TimeUnit

WaitForSecond waits until the next second then returns the current number of seconds It returns a monotonically increasing count of seconds. If execution is somehow paused seconds will jump ahead when it returns, assuming the interrupt is still triggering.

Jump to

Keyboard shortcuts

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