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.

        Source Files