roundtimer

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoundTimer

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

RoundTimer is a wrapper around timer to fit the use in an iBFT instance

func New

func New() *RoundTimer

New returns a new instance of RoundTimer

func (*RoundTimer) Reset

func (t *RoundTimer) Reset(d time.Duration)

Reset will return a channel that sends true if the timer lapsed or false if it was cancelled If Start is called more than once, the first timer and chan are returned and used

func (*RoundTimer) ResultChan

func (t *RoundTimer) ResultChan() chan bool

ResultChan returns the result chan true if the timer lapsed or false if it was stopped

func (*RoundTimer) Stop

func (t *RoundTimer) Stop()

Stop will stop the timer and send false on the result chan

func (*RoundTimer) Stopped

func (t *RoundTimer) Stopped() bool

Stopped returns true if there is no running timer

Jump to

Keyboard shortcuts

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