clock

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package clock provides a minimal injectable time source so runtimes and the in-memory test store can be driven by a controllable clock in tests while using the real wall clock in production.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

Clock returns the current time.

type SystemClock

type SystemClock struct{}

SystemClock is a Clock backed by the wall clock.

func (SystemClock) Now

func (SystemClock) Now() time.Time

Now returns the current system time.

Jump to

Keyboard shortcuts

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