This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.
Source for wiki TimeCowan version 11
author
cowan
comment
ipnr
67.158.180.76
name
TimeCowan
readonly
0
text
== Time ==
`(current-posix-millisecond)`
Returns a rational number representing the current millisecond of the Posix epoch, which began on 00:00:00 on 1 January 1970, Coordinated Universal Time but excludes all leap seconds. Implementations SHOULD return a value that is:
* As accurate as reasonably achievable.
* Provides at least 1-second precision.
* Provides a range of at least 2^31^ seconds before and after the epoch.
.
Implementations MAY return exact or inexact values, and SHOULD return inexact values unless:
* The value is an integer.
* The range of most-efficiently-implemented exact integers in the implementation exceeds the integer range of inexact rationals.
In practice this means that implementations with fixnums greater than 2^53^ should return fixnums unless they have time-of-day clocks that provide more than 1 ms precision, and all other implementations should return IEEE 64-bit floats.
If the implementation cannot provide the time when `current-posix-milliseconds` is called (either temporarily or permanently), it MUST return `#f`.
Note that there is about a 1 in 10^-8^ probability that a computation of elapsed
time made by calling this procedure twice will be off by 1 second, given the number of leap seconds between 1972 and 2011.
== Date and Time Arithmetic (WG2) ==
See TimeAdvancedCowan.
== Time Durations and Periods (WG2) ==
See TimePeriodsCowan.
== Time formatting (WG2) ==
See TimeFormattingCowan.
time
2010-11-27 09:46:16
version
11