time

package
v0.0.3-pre4.0...-0ec3cfc Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BIOTicker

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

BIOTicker is a wrapper for time.Ticker

func NewBIOTicker

func NewBIOTicker(interval gotime.Duration) *BIOTicker

NewBIOTicker creates a new BIO ticker

func (*BIOTicker) C

func (bt *BIOTicker) C() <-chan gotime.Time

C returns the channel

func (*BIOTicker) Stop

func (bt *BIOTicker) Stop()

Stop stops the ticker

type MockTicker

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

MockTicker os a mocked ticker

func NewMockTicker

func NewMockTicker() *MockTicker

NewMockTicker creates a new mock ticker

func (*MockTicker) C

func (m *MockTicker) C() <-chan gotime.Time

C gets the channel of the ticker

func (*MockTicker) Stop

func (m *MockTicker) Stop()

Stop is here to fulfill an interface

func (*MockTicker) Tick

func (m *MockTicker) Tick()

Tick lets the mock ticker tick

type Ticker

type Ticker interface {
	C() <-chan gotime.Time
	Stop()
}

Ticker is a ticker interface that allows mocking tickers

Jump to

Keyboard shortcuts

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