time

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MPL-2.0, MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDebounceTimer

func NewDebounceTimer(o *DebounceTimerOption) (*cage_time_mocks.Timer, *cage_time_mocks.Clock, chan time.Time, <-chan time.Time)

NewDebounceTimer expands on NewTimer by providing a channel to which tests can write in order to simulate a timer expiration.

func NewTimer

NewTimer returns a mock timer and a mock clock configured to provide it.

func RWChanToROChan

func RWChanToROChan(rw chan time.Time) <-chan time.Time

RWChanToROChan converts a bi-directional channel to a read-only one.

Types

type DebounceTimerOption

type DebounceTimerOption struct {
	ResetReturnTrue bool
}

Jump to

Keyboard shortcuts

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