testtime

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package testtime provides ways to scale time for tests running on CPU starved systems.

Index

Constants

This section is empty.

Variables

View Source
var (
	// X is the multiplier from the TEST_TIME_SCALE environment variable.
	X = 1.0
	// Millisecond is a millisecond dilated into test time by TEST_TIME_SCALE.
	Millisecond = time.Millisecond
	// Second is a second dilated into test time by TEST_TIME_SCALE.
	Second = time.Second
)

Functions

func Scale

func Scale(timeout time.Duration) time.Duration

Scale returns the timeout multiplied by any set multiplier.

func Sleep

func Sleep(duration time.Duration)

Sleep sleeps the given duration in test time scale.

Types

This section is empty.

Jump to

Keyboard shortcuts

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