package
19.1.0-beta.20190304+incompatible
Repository: https://github.com/darinpp/cockroach.git
Documentation: pkg.go.dev
# Functions
Add returns the time t+d, using a configurable mode.
AddMicros adds the microsecond delta to the provided time value.
Decode reverses the three integers returned from Encode and produces an equal Duration to the original.
DecodeDuration returns a Duration without rounding nanos.
DiffMicros computes the microsecond difference between two time values.
FromBigInt converts a big.Int number of nanoseconds to a duration.
FromFloat64 converts a float64 number of seconds to a duration.
FromInt64 converts an int64 number of seconds to a duration.
MakeDuration returns a Duration rounded to the nearest microsecond.
Truncate returns a new duration obtained from the first argument by discarding the portions at finer resolution than that given by the second argument.
# Constants
AdditionModeCompatible applies a date-normalization strategy which produces results which are more compatible with PostgreSQL in which adding a month "rounds down" to the last day of a month instead of producing a value in the following month.
AdditionModeLegacy delegates to time.Time.AddDate() for performing Time+Duration math.
# Variables
ErrEncodeOverflow is returned by Encode when the sortNanos returned would have overflowed or underflowed.
# Interfaces
Context is used to prevent a package-dependency cycle via tree.EvalContext.
# Type aliases
AdditionMode controls date normalization behaviors in Add().