srfi.174
- POSIX timespecs ¶Note: This srfi is originally intended to be used with SRFI-170
(see srfi.170
- POSIX API), but it turned out this was not enough to support
the latter–notably, we need SRFI-19 type argument in the constructor.
Consequently, it is likely that this srfi will be superseded later.
We deprecate using this srfi; if you need a portable time representation,
SRFI-19 is the best choice at this moment. See srfi.19
- Time data types and procedures,
for the details.
[SRFI-174]{srfi.174
}
Creates and returns a timespec, whose second part is secs and
nanosecond part is nsecs. The second part must be an exact
integer; if it is positive, it’s the number of seconds since
Epoch (Jan 1, 1970 UTC), and if it’s negative, it’s before the Epoch.
The nanosecond part is a nonnegative integer less than 1e9, and represents
the fraction of seconds in nanosecond resolution. Note that if the second
part is negative, the nanosecond part counts toward past.
This is the same as (make-time time-utc nsecs secs)
of
SRFI-19. Note the order of arguments.
[SRFI-174]{srfi.174
}
Returns #t
iff obj is a <time>
object. It doesn’t
check the type of time.
[SRFI-174]{srfi.174
}
Returns second and nanosecond part of the <time>
object.
Same as time-second
and time-nanosecond
of SRFI-19
(note that we use plurals in this srfi).
[SRFI-174]{srfi.174
}
Convert an inexact real number v to a timespec. The integral part
of v is the seconds after (when v is positive)
or before (when v is negative) the Epoch, and the fractional part
is rounded into nanosecond resolution.
[SRFI-174]
Convert a timespec into an inexact real number in seconds.
{srfi.174
}
[SRFI-174]{srfi.174
}
Returns #t
iff two timespecs are the same.
It is the same as time=?
in SRFI-19.
[SRFI-174]{srfi.174
}
Returns #t
iff a timespec ts1 is strictly before
the timespec ts2. It is the same as time<?
in SRFI-19.