Next: ASCII文字ライブラリ, Previous: フック(srfi), Up: ライブラリモジュール - SRFI [Contents][Index]

`srfi-174`

- POSIX timespecs- Module:
**srfi-174** -
Note: This srfi is originally intended to be used with srfi-170 (see 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 時間のデータ型と手続き, for the details.

- Function:
**timespec***secs nsecs* [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.

- Function:
**timespec?***obj* [SRFI-174] {

`srfi-174`} Returns`#t`

iff`obj`is a`<time>`

object. It doesn’t check the type of time.

- Function:
**timespec-seconds***ts* - Function:
**timespec-nanosecods***ts* [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).

- Function:
**inexact->timespec***v* [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.

- Function:
**timespec->inexact***ts* [SRFI-174] Convert a timespec into an inexact real number in seconds. {

`srfi-174`}

- Function:
**timespec=?***ts1 ts2* [SRFI-174] {

`srfi-174`} Returns`#t`

iff two timespecs are the same. It is the same as`time=?`

in srfi-19.

- Function:
**timespec<?***ts1 ts2* [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.

- Function:
**timespec-hash***ts* [SRFI-174] {

`srfi-174`} Compute a hash value of a timespec`ts`. It is same as passing a`<time>`

object to`default-hash`

, and affected by the current hash salt value (see ハッシュ).

Next: ASCII文字ライブラリ, Previous: フック(srfi), Up: ライブラリモジュール - SRFI [Contents][Index]