time2

package
v0.0.0-...-ed99311 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2014 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

time2 is a collection of functions meant to supplement the capabilities provided by the standard "time" package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClock

type MockClock struct {
	// contains filtered or unexported fields
}

A fake clock useful for testing timing.

func (*MockClock) Advance

func (c *MockClock) Advance(delta time.Duration)

Advances the mock clock by the specified duration.

func (*MockClock) Now

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

Returns the fake current time.

func (*MockClock) Reset

func (c *MockClock) Reset()

Resets the mock clock back to initial state.

func (*MockClock) Since

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

Returns the time elapsed since the fake current time.

Jump to

Keyboard shortcuts

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