123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- @node POSIX time
- @section Time
- A @dfn{time} record contains an integer that represents a time as the
- number of seconds since the Unix epoch (00:00:00 GMT, January 1, 1970).
- These procedures for operating on time records are in the structures
- @code{posix-time} & @code{posix}.
- @deffn procedure make-time seconds @returns{} time
- @deffnx procedure current-time @returns{} time
- @deffnx procedure time? object @returns{} boolean
- @deffnx procedure time-seconds time @returns{} integer
- @code{Make-time} & @code{current-time} construct time records;
- @code{make-time} uses the number of seconds that is its argument, and
- @code{current-time} uses the current number of seconds since the epoch.
- @code{Time?} is the disjoint type predicate for time objects.
- @code{Time-seconds} returns the number of seconds recorded by
- @var{time}.
- @end deffn
- @deffn procedure time=? time@suba{a} time@suba{b} @returns{} boolean
- @deffnx procedure time<? time@suba{a} time@suba{b} @returns{} boolean
- @deffnx procedure time<=? time@suba{a} time@suba{b} @returns{} boolean
- @deffnx procedure time>? time@suba{a} time@suba{b} @returns{} boolean
- @deffnx procedure time>=? time@suba{a} time@suba{b} @returns{} boolean
- Various time comparators. @code{Time=?} returns true if its two
- arguments represent the same number of seconds since the epoch.
- @code{Time<?}, @code{time<=?}, @code{time>?}, & @code{time>=} return
- true if their arguments are monotonically increasing, monotonically
- non-decreasing, monotonically decreasing, or monotonically
- non-increasing, respectively.
- @end deffn
- @deffn procedure time->string time @returns{} string
- Returns a string representation of @var{time} in the format of
- @code{"@var{DDD} @var{MMM} @var{HH}:@var{MM}:@var{SS} @var{YYYY}"}.
- For example,
- @lisp
- (time->string (make-time 1234567890))
- @result{} "Fri Feb 13 18:31:30 2009"@end lisp
- @strong{Note:} The string has a newline suffix.
- @end deffn
|