timecop

package
v0.151.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const BlazingFast = 100

Variables

This section is empty.

Functions

func SetSpeed

func SetSpeed(tb testing.TB, multiplier float64)

func Travel

func Travel[D time.Duration | time.Time](tb testing.TB, d D, tos ...TravelOption)

Types

type TravelOption

type TravelOption interface {
	// contains filtered or unexported methods
}

func Freeze

func Freeze() TravelOption

Freeze instruct travel to freeze the time.

func Unfreeze

func Unfreeze() TravelOption

Unfreeze instruct travel to unfreeze the time.

Jump to

Keyboard shortcuts

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