| 1 |
#!r6rs |
| 2 |
;; Copyright 2010 Derick Eddington. My MIT-style license is in the file named |
| 3 |
;; LICENSE from the original collection this file is distributed with. |
| 4 |
|
| 5 |
(library (srfi :19 time compat) |
| 6 |
(export |
| 7 |
time-resolution |
| 8 |
timezone-offset |
| 9 |
current-time |
| 10 |
cumulative-thread-time |
| 11 |
cumulative-process-time |
| 12 |
cumulative-gc-time |
| 13 |
time-nanosecond |
| 14 |
time-second) |
| 15 |
(import |
| 16 |
(rnrs base) |
| 17 |
(only (ikarus) |
| 18 |
current-time |
| 19 |
time-nanosecond |
| 20 |
time-second |
| 21 |
time-gmt-offset) |
| 22 |
(srfi :19 time not-implemented)) |
| 23 |
|
| 24 |
;; Ikarus uses gettimeofday() which gives microseconds, |
| 25 |
;; so our resolution is 1000 nanoseconds |
| 26 |
(define time-resolution 1000) |
| 27 |
|
| 28 |
(define timezone-offset (time-gmt-offset (current-time))) |
| 29 |
) |