package
0.0.0-20181025162720-c8a214aafdbb
Repository: https://github.com/turbinelabs/nonstdlib.git
Documentation: pkg.go.dev

# Functions

AfterFunc creates a new Timer, wrapping a time.Timer that will invoke the given function after the given duration.
Equal compares pointers to two times for equality.
Format uses the canonical Turbine time format and converts the *time.Time to a string using it.
FromUnixMicro returns a time.Time from the given microseconds from "January 1, 1970 UTC".
FromUnixMilli returns a time.Time from the given milliseconds from "January 1, 1970 UTC".
Max returns the latest of several time.Time instances.
Min returns the earliest of several time.Time instances.
NewIncrementingControlledSource returns a new ControlledSource that increments the controlled time by some delta every time Now() is called.
NewMockTimer creates a new mock instance.
NewSource creates a new Source for normal use.
NewTimer creates a new Timer, wrapping a time.Timer that will expire after the given duration.
Parse takes a timestamp in the Turbine canonical format and returns a pointer to the represented time.
ToUnixMicro returns a Unix timestamp in microseconds from "January 1, 1970 UTC".
ToUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
TruncUnixMicro truncates the given time to microsecond resolution.
TruncUnixMilli truncates the given time to millisecond resolution.
WithCurrentTimeFrozen Creates a new ControlledSource with the current time and passes it to the given function for testing.
WithTimeAt creates a new ControlledSource with the given time and passes it to the given function for testing.

# Constants

CookieFormat is the cannonical format for representing a time as a cookie as specified in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date.
TurbineFormat is the canonical format we want to display timestamps in.

# Structs

MockTimer is a mock of Timer interface.
MockTimerMockRecorder is the mock recorder for MockTimer.

# Interfaces

ControlledSource is a source of time.Time values that returns a fixed time unless modified with the Set or Advance methods.
Source is a source of time.Time values and Timer instances.
Timer is a trivial wrapper around time.Timer which allows a timer to be mocked and/or replaced with an implementation that can be triggered deterministically.