| 1 |
;;; Copyright (c) 2012 Aaron W. Hsu <[email protected]> |
| 2 |
;;; |
| 3 |
;;; Permission to use, copy, modify, and distribute this software for |
| 4 |
;;; any purpose with or without fee is hereby granted, provided that the |
| 5 |
;;; above copyright notice and this permission notice appear in all |
| 6 |
;;; copies. |
| 7 |
;;; |
| 8 |
;;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 9 |
;;; WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 10 |
;;; WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 11 |
;;; AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 12 |
;;; DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA |
| 13 |
;;; OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 14 |
;;; TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 15 |
;;; PERFORMANCE OF THIS SOFTWARE. |
| 16 |
|
| 17 |
(library (srfi :19 time compat) |
| 18 |
(export time-resolution |
| 19 |
timezone-offset |
| 20 |
current-time |
| 21 |
cumulative-thread-time |
| 22 |
(rename (cpu-time cumulative-process-time)) |
| 23 |
cumulative-gc-time |
| 24 |
time-nanosecond |
| 25 |
time-second) |
| 26 |
(import (chezscheme)) |
| 27 |
|
| 28 |
(define time-resolution 1) |
| 29 |
|
| 30 |
(define (cumulative-thread-time . args) |
| 31 |
(assertion-violation 'cumulative-thread-time "not implemented")) |
| 32 |
|
| 33 |
(define (cumulative-gc-time) (sstats-gc-cpu (statistics))) |
| 34 |
|
| 35 |
(define timezone-offset (date-zone-offset (time-utc->date (current-time)))) |
| 36 |
|
| 37 |
) |