time2

package
Version: v0.0.0-...-df3943b Latest Latest
Warning

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

Go to latest
Published: Jul 8, 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.

Jump to

Keyboard shortcuts

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