clock

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package clock provides an injectable time source so time-based decisions (event window, freeze) are testable without sleeping (docs/v0.1/03-tech-stack.md).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock func() time.Time

Clock returns the current time. Production uses System; tests inject a fixed one.

func Fixed

func Fixed(t time.Time) Clock

Fixed returns a clock that always reports t.

func System

func System() Clock

System is the real wall clock in UTC.

Jump to

Keyboard shortcuts

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