clock

package
v0.0.0-...-45fc8d6 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Clock

type Clock interface {
	NowUTC() time.Time
	NowMonotonic() time.Time
}

type MockClock

type MockClock struct {
	Time time.Time
}

func NewMockClock

func NewMockClock() *MockClock

func NewMockClockAt

func NewMockClockAt(timestamp string) *MockClock

func NewMockClockAtTime

func NewMockClockAtTime(t time.Time) *MockClock

func (*MockClock) AdvanceSeconds

func (c *MockClock) AdvanceSeconds(seconds int)

func (*MockClock) NowMonotonic

func (c *MockClock) NowMonotonic() time.Time

func (*MockClock) NowUTC

func (c *MockClock) NowUTC() time.Time

type SystemClock

type SystemClock struct{}

func NewSystemClock

func NewSystemClock() *SystemClock

func (*SystemClock) NowMonotonic

func (*SystemClock) NowMonotonic() time.Time

func (*SystemClock) NowUTC

func (*SystemClock) NowUTC() time.Time

Jump to

Keyboard shortcuts

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