custom_clock

package module
v0.0.0-...-16056d8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: GPL-3.0 Imports: 3 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 struct {
	// contains filtered or unexported fields
}

func NewClock

func NewClock(speed float64, now Time) *Clock

func (*Clock) Now

func (c *Clock) Now() Time

func (*Clock) SleepUntil

func (c *Clock) SleepUntil(ctx context.Context, t Time) error

func (*Clock) Speed

func (c *Clock) Speed() float64

type Time

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

func NewCustomTime

func NewCustomTime(t time.Time) Time

func (Time) Format

func (t Time) Format(format string) string

func (Time) Sub

func (t Time) Sub(t1 Time) time.Duration

Jump to

Keyboard shortcuts

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