Help us shape the future of Go! Take the 2026 Go Developer Survey

testkit

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package testkit provides deterministic execution clocks for tests.

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 is a concurrency-safe clock advanced explicitly by the test.

func (*Clock) Advance

func (c *Clock) Advance(d time.Duration)

Advance moves test time forward by d.

func (*Clock) Now

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

Now returns the current test time.

func (*Clock) Since

func (c *Clock) Since(t time.Time) time.Duration

Since returns elapsed test time since t.

Jump to

Keyboard shortcuts

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