Previous: , Up: built-in time   [Contents][Index]


6.25.2 Time spans since the Epoch

Built-in Type: <epoch-time>
Parent Type: <time>

Type name of time objects representing the time elapsed since the Epoch. The time is internally represented with nanosecond resolution.

Objects of this type representing the current time are returned by the function epoch-time and built using the POSIX function clock_gettime() with the argument CLOCK_REALTIME; (*manpages*)Clock and time functions.

Constructor on <epoch-time>: <epoch-time> constructor {seconds <exact-integer>} {nanoseconds <fixnum>}

Build and return a new <epoch-time> object. The arguments are normalised as explained for the constructor of <time>.

Type predicate on <epoch-time>: <boolean> type-predicate obj

Return #t if obj is a <epoch-time> object; otherwise return #f.

Method on <epoch-time>: <epoch-time> + this {T <time>}

Add T to this and return the result.

Method on <epoch-time>: <epoch-time> - this {T <time>}

Subtract T from this and return the result.