std/time/duration▲toc

Time durations in SI seconds.

Durations use SI seconds.

type durationstd/time/duration/duration: V

A duration in time in (TAI) SI seconds (as measured on the earth's geoid).
A duration is represented by a ddoublestd/num/ddouble/ddouble: V giving it a high range and precision (see the instant module).

Create a duration from whole seconds secs and a fraction of seconds frac.

Create a durationstd/time/duration/duration: V of n “days” (assuming 86400s in a day).

Convert a timespanstd/time/timestamp/timespan: V to a durationstd/time/duration/duration: V. Be careful to only use use this on timespan's that are in TAI SI seconds!

The fractional seconds of a duration as a float64std/core/types/float64: V. d.seconds == d.truncate.fixed + d.fraction.fixed.

Is this a negative duration?

Is this a positive duration?

Return the duration in rounded SI milli-seconds.

Return the duration in rounded SI nano-seconds.

Show a duration in SI seconds.

The whole seconds (in some time unit) of the duration as intstd/core/types/int: V. Rounds towards zero..

Convert a timestampstd/time/timestamp/timestamp: V to a durationstd/time/duration/duration: V. Be careful to only use use this on timestamp's that are in TAI SI seconds and do not contain leap seconds!

Create a durationstd/time/duration/duration: V of n “weeks” (assuming 7 days of 86400s).

Create a durationstd/time/duration/duration: V of n “years” (assuming 365 days of 86400s).

private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/exnstd/core/exn, std/core/boolstd/core/bool, std/core/orderstd/core/order, std/core/charstd/core/char, std/core/intstd/core/int, std/core/vectorstd/core/vector, std/core/stringstd/core/string, std/core/sslicestd/core/sslice, std/core/liststd/core/list, std/core/maybestd/core/maybe, std/core/eitherstd/core/either, std/core/tuplestd/core/tuple, std/core/showstd/core/show, std/core/debugstd/core/debug, std/core/delayedstd/core/delayed, std/core/consolestd/core/console, std/corestd/core, std/num/ddoublestd/num/ddouble, std/time/timestampstd/time/timestamp, std/num/float64std/num/float64, std/num/int32std/num/int32