[previous] [up] [next]     [contents] [index]
Next: Machine Time Up: Time Previous: Time

Real Time and Date

(current-seconds) returns the current time in seconds. This time is always an exact integer based on a platform-specific starting date (with an architecture-specific minimum and maximum value).

The value of (current-seconds) increases as time passes, so the values returned by current-seconds can be compared directly with the numerical comparison procedures. The current time in seconds can also be compared with a time returned by file-modify-seconds (see section 11.2.2).

(seconds->date secs) takes secs, a platform-specific time in seconds returned by current-seconds or file-modify-seconds, and returns an instance of the date structure type with the following fields:

The value returned by current-seconds or file-modify-seconds is not portable among platforms. Convert a time in seconds using seconds->date when portability is needed.

See also section 15.2.7 for additional date utilities.



PLT