- Timestamp:
- 05/03/20 02:55:09 (9 months ago)
- Location:
- release/5/srfi-19/trunk
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release/5/srfi-19/trunk/srfi-19-common.scm
r38295 r38676 3 3 ;; -- Miscellaneous Constants. 4 4 5 (define-constant NS/MS 1000000)6 (define-constant NS/MuS 1000)5 (define-constant MS/NS 1000000) 6 (define-constant MuS/NS 1000) 7 7 8 8 (define-constant MS/S 1000) -
release/5/srfi-19/trunk/srfi-19-tm.scm
r38668 r38676 92 92 tm:seconds->time-values 93 93 tm:seconds->time 94 tm:current-time-values95 94 tm:current-time-utc 96 95 tm:current-time-tai … … 546 545 547 546 (define (tm:time->milliseconds tim) 548 (+ (/ (%time-nanosecond tim) NS/MS) (* (%time-second tim) MS/S)) )547 (+ (/ (%time-nanosecond tim) MS/NS) (* (%time-second tim) MS/S)) ) 549 548 550 549 (define (tm:nanoseconds->seconds ns) … … 564 563 milliseconds microseconds nanoseconds) 565 564 (let ( 566 (nanos (+ (* milliseconds NS/MS) (* microseconds NS/MuS) nanoseconds))565 (nanos (+ (* milliseconds MS/NS) (* microseconds MuS/NS) nanoseconds)) 567 566 (secs (+ (* days SEC/DY) (* hours SEC/HR) (* minutes SEC/MIN) seconds)) ) 568 567 (let-values ( … … 580 579 ((sec ms-sec) (quotient&remainder ms MS/S)) ) 581 580 (let ( 582 (ns (* (number->integer ms-sec) NS/MS)) )581 (ns (* (number->integer ms-sec) MS/NS)) ) 583 582 (values ns sec) ) ) ) 584 583 … … 597 596 ;; Current time routines 598 597 599 (import (only srfi-19-tmctm tm:current-time-values)) 598 (cond-expand 599 (unix 600 ;add back C_startup_time_seconds 601 (define tm:current-time-values 602 (let ((t0 (current-seconds))) 603 (lambda () 604 (let-values (((s ms) (quotient&remainder (current-milliseconds) MS/S))) 605 (values (* ms MS/NS) (+ t0 s)) ) ) ) ) ) 606 (else 607 (define (tm:current-time-values) 608 (values 0 (current-seconds)) ) ) ) 600 609 601 610 (define (tm:current-time-utc) … … 627 636 628 637 (define (tm:time-resolution tt) 629 NS/MS )638 MS/NS ) 630 639 631 640 ;; Time Comparison -
release/5/srfi-19/trunk/srfi-19.egg
r38669 r38676 2 2 3 3 ((synopsis "Time Data Types and Procedures") 4 (version "4.4. 1")4 (version "4.4.2") 5 5 (category data) 6 6 (author "Will Fitzgerald (for Chicken by [[/users/kon-lovett]])") … … 54 54 (component-dependencies srfi-19-support srfi-19-tm srfi-19-io) 55 55 (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks" "-no-bound-checks")) 56 (extension srfi-19-tmctm57 (types-file)58 (csc-options "-O4" "-d0" "-strict-types" "-no-procedure-checks" "-no-bound-checks" "-no-argc-checks"))59 56 (extension srfi-19-tm 60 57 (types-file) 61 (component-dependencies srfi-19-timezone srfi-19-tmctm)58 (component-dependencies srfi-19-timezone) 62 59 (csc-options "-O4" "-d0" "-strict-types" "-no-procedure-checks" "-no-bound-checks" "-no-argc-checks")) 63 60 (extension srfi-19-timezone
Note: See TracChangeset
for help on using the changeset viewer.