From 4318a7cea7d1a37de2e93fa26a21ada9bbdaca2f Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Wed, 5 Dec 2007 03:11:47 -0500 Subject: [PATCH] * fixed name of time-second (was time-seconds before). --- scheme/ikarus.time-and-date.ss | 16 ++++++++++++---- scheme/last-revision | 2 +- scheme/makefile.ss | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/scheme/ikarus.time-and-date.ss b/scheme/ikarus.time-and-date.ss index b6d233b..16faf68 100644 --- a/scheme/ikarus.time-and-date.ss +++ b/scheme/ikarus.time-and-date.ss @@ -15,9 +15,10 @@ (library (ikarus system time-and-date) - (export current-time time? time-seconds) + (export current-time time? time-second time-nanosecond) (import - (except (ikarus) time current-time time? time-seconds)) + (except (ikarus) time current-time time? time-second + time-nanosecond)) (define-struct time (msecs secs usecs)) ;;; mega/seconds/micros @@ -25,9 +26,16 @@ (define (current-time) (foreign-call "ikrt_current_time" (make-time 0 0 0))) - (define (time-seconds x) + (define (time-second x) (if (time? x) (+ (* (time-msecs x) #e10e6) (time-secs x)) - (error 'time-seconds "not a time" x)))) + (error 'time-second "not a time" x))) + + (define (time-nanosecond x) + (if (time? x) + (* (time-usecs x) 1000) + (error 'time-nanosecond "not a time" x))) + + ) diff --git a/scheme/last-revision b/scheme/last-revision index 10f1cd9..73a426e 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1183 +1185 diff --git a/scheme/makefile.ss b/scheme/makefile.ss index 58466e3..19220e1 100755 --- a/scheme/makefile.ss +++ b/scheme/makefile.ss @@ -373,7 +373,8 @@ [time-it i] [current-time i] [time? i] - [time-seconds i] + [time-second i] + [time-nanosecond i] [command-line-arguments i] [set-rtd-printer! i] [make-record-type i]