roundtimer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 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) CloseChan added in v0.0.18

func (t *RoundTimer) CloseChan()

CloseChan closes the results chan

func (*RoundTimer) Kill added in v0.0.18

func (t *RoundTimer) Kill()

Kill will stop the timer (without the ability to restart it) and send false on the result chan

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) 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