mockable

package
v1.22.41 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: BSD-3-Clause Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

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

Clock is a mockable clock

func NewClock

func NewClock() *Clock

NewClock creates a new clock

func (*Clock) Advance

func (c *Clock) Advance(d time.Duration)

Advance advances the clock

func (*Clock) Now

func (c *Clock) Now() time.Time

Now returns current time

func (*Clock) Real

func (c *Clock) Real()

Real returns to real time

func (*Clock) Set

func (c *Clock) Set(t time.Time)

Set sets the clock time

Jump to

Keyboard shortcuts

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