mocktime

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KTimeEpoch = StartTime.Add(-StartKTime)
View Source
var StartKTime = 1000 * time.Hour
View Source
var StartTime, _ = time.Parse(time.RFC3339, "2006-01-02T15:04:05Z")

Functions

This section is empty.

Types

type MockTime

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

func New

func New() *MockTime

func (*MockTime) After

func (m *MockTime) After(t time.Duration) <-chan time.Time

func (*MockTime) HasTimers

func (m *MockTime) HasTimers() bool

func (*MockTime) IncrementTime

func (m *MockTime) IncrementTime(t time.Duration)

func (*MockTime) KTimeNanos

func (m *MockTime) KTimeNanos() int64

func (*MockTime) NewTimer

func (m *MockTime) NewTimer(d timeshim.Duration) timeshim.Timer

func (*MockTime) Now

func (m *MockTime) Now() time.Time

func (*MockTime) SetAutoIncrement

func (m *MockTime) SetAutoIncrement(t time.Duration)

func (*MockTime) Since

func (m *MockTime) Since(t time.Time) time.Duration

func (*MockTime) Until

func (m *MockTime) Until(t time.Time) time.Duration

Jump to

Keyboard shortcuts

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