clock

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock = clock.Clock

func GetClock

func GetClock(ctx context.Context) Clock

GetClock either retrieves a mock clock from the context or returns a realtime clock.

type Mock

type Mock = clock.Mock

func NewMock

func NewMock() *Mock

NewMock returns an instance of a mock clock. The current time of the mock clock on initialization is the Unix epoch.

func WithMockClock

func WithMockClock(ctx context.Context) (context.Context, *Mock)

WithMockClock embeds a mock clock in the context and returns it.

type Timer

type Timer = clock.Timer

Jump to

Keyboard shortcuts

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