clock

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package clock provides a test-overridable millisecond clock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NowMillis

func NowMillis() int64

NowMillis returns the current time in Unix milliseconds.

func ResetForTesting

func ResetForTesting()

ResetForTesting restores the real clock.

func SetForTesting

func SetForTesting(fn func() int64)

SetForTesting overrides the clock. Call ResetForTesting to restore.

Types

This section is empty.

Jump to

Keyboard shortcuts

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