fakeclock

package
v0.0.0-...-e777c55 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fakeclock Defines a fake clock that implements the clock package

Use this if you want to fix the time for a dummy or specify it explicitly.

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 implementation that returns a fixed time.

func New

func New(t time.Time) *Clock

New Generates and returns a Clock fixed at the specified time.

func (*Clock) Now

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

Now Returns a fixed time.

func (*Clock) SetTime

func (s *Clock) SetTime(t time.Time)

SetTime Change the time to the specified value.

Jump to

Keyboard shortcuts

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