Next: iklib time epoch, Up: iklib time [Index]
Time spans are represented by instances of <time>
objects, which
is a disjoint object–type. A <time>
object can represent both
absolute times (typically elapsed times since the Epoch) and positive
and negative time spans relative to an arbitrary origin. The internal
time representation has nanosecond resolution and it is immutable.
The following bindings are exported by the library (vicare)
.
Build and return a new <time>
object. If nanoseconds
exceeds #e1e9
its value is normalised and the excess added to
seconds. If seconds exceeds #e1e6
its value is
normalised and the excess added to megaseconds.
Return #t
if obj is a <time>
object; otherwise return
#f
.
Return #t
if obj is a (possibly empty) proper list of
<time>
objects; otherwise return #f
.
The number of seconds and nanoseconds in the represented time span.
Return a real number representing the time in seconds. This single number is built from seconds and nanoseconds.
Compute the addition between time objects: T1 + T +
...
and return a time struct representing it.
When only one argument is given: return the negation of the time object.
When multiple arguments are given, compute the difference between time
objects: T1 - (T + ...)
and return a time struct
representing it.
Return #t
if the time objects are equal, else return #f
.
Return #t
if the arguments are all different: no two arguments are
equal; otherwise return #f
. When applied to a single argument:
return #f
.
Return #t
if the time objects are monotonically increasing; else
return #f
.
Return #t
if the time objects are monotonically non–decreasing;
else return #f
.
Return #t
if the time objects are monotonically decreasing; else
return #f
.
Return #t
if the time objects are monotonically non–decreasing;
else return #f
.
Return the maximum or minimum between the arguments.
Next: iklib time epoch, Up: iklib time [Index]