From d61e50410bd4a0161756c16e73057dec7a66a62b Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 26 Feb 2010 20:50:35 +0000 Subject: [PATCH] fix srfi 19 nanoseconds svn: r18363 --- collects/srfi/19/time.ss | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/collects/srfi/19/time.ss b/collects/srfi/19/time.ss index 2b379efc67..0a30bcc0e4 100644 --- a/collects/srfi/19/time.ss +++ b/collects/srfi/19/time.ss @@ -301,20 +301,20 @@ (define (tm:current-time-utc) (receive (seconds ms) (tm:get-time-of-day) - (make-time time-utc (* ms 10000) seconds))) + (make-time time-utc (* ms 1000000) seconds))) (define (tm:current-time-tai) (receive (seconds ms) (tm:get-time-of-day) (make-time time-tai - (* ms 10000) + (* ms 1000000) (+ seconds (tm:leap-second-delta seconds)) ))) (define (tm:current-time-ms-time time-type proc) (let ((current-ms (proc))) (make-time time-type - (* (remainder current-ms 1000) 10000) - (quotient current-ms 10000) + (* (remainder current-ms 1000) 1000000) + (quotient current-ms 1000000) ))) ;; -- we define it to be the same as TAI. @@ -325,7 +325,7 @@ (define (tm:current-time-monotonic) (receive (seconds ms) (tm:get-time-of-day) (make-time time-monotonic - (* ms 10000) + (* ms 1000000) (+ seconds (tm:leap-second-delta seconds)) ))) @@ -357,12 +357,12 @@ (define (time-resolution . clock-type) (let ((clock-type (:optional clock-type time-utc))) (cond - ((eq? clock-type time-tai) 10000) - ((eq? clock-type time-utc) 10000) - ((eq? clock-type time-monotonic) 10000) - ((eq? clock-type time-thread) 10000) - ((eq? clock-type time-process) 10000) - ((eq? clock-type time-gc) 10000) + ((eq? clock-type time-tai) 1000000) + ((eq? clock-type time-utc) 1000000) + ((eq? clock-type time-monotonic) 1000000) + ((eq? clock-type time-thread) 1000000) + ((eq? clock-type time-process) 1000000) + ((eq? clock-type time-gc) 1000000) (else (tm:time-error 'time-resolution 'invalid-clock-type clock-type))))) (define (tm:time-compare-check time1 time2 caller)