Changeset 38676 in project for release


Ignore:
Timestamp:
05/03/20 02:55:09 (3 months ago)
Author:
Kon Lovett
Message:

fix NS/MS & NS/MuS name, only unix ts

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  
    33;; -- Miscellaneous Constants.
    44
    5 (define-constant NS/MS  1000000)
    6 (define-constant NS/MuS 1000)
     5(define-constant MS/NS  1000000)
     6(define-constant MuS/NS 1000)
    77
    88(define-constant MS/S  1000)
  • release/5/srfi-19/trunk/srfi-19-tm.scm

    r38668 r38676  
    9292  tm:seconds->time-values
    9393  tm:seconds->time
    94   tm:current-time-values
    9594  tm:current-time-utc
    9695  tm:current-time-tai
     
    546545
    547546(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)) )
    549548
    550549(define (tm:nanoseconds->seconds ns)
     
    564563          milliseconds microseconds nanoseconds)
    565564        (let (
    566           (nanos (+ (* milliseconds NS/MS) (* microseconds NS/MuS) nanoseconds))
     565          (nanos (+ (* milliseconds MS/NS) (* microseconds MuS/NS) nanoseconds))
    567566    (secs (+ (* days SEC/DY) (* hours SEC/HR) (* minutes SEC/MIN) seconds)) )
    568567    (let-values (
     
    580579    ((sec ms-sec) (quotient&remainder ms MS/S)) )
    581580    (let (
    582       (ns (* (number->integer ms-sec) NS/MS)) )
     581      (ns (* (number->integer ms-sec) MS/NS)) )
    583582      (values ns sec) ) ) )
    584583
     
    597596;; Current time routines
    598597
    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)) ) ) )
    600609
    601610(define (tm:current-time-utc)
     
    627636
    628637(define (tm:time-resolution tt)
    629   NS/MS )
     638  MS/NS )
    630639
    631640;; Time Comparison
  • release/5/srfi-19/trunk/srfi-19.egg

    r38669 r38676  
    22
    33((synopsis "Time Data Types and Procedures")
    4  (version "4.4.1")
     4 (version "4.4.2")
    55 (category data)
    66 (author "Will Fitzgerald (for Chicken by [[/users/kon-lovett]])")
     
    5454    (component-dependencies srfi-19-support srfi-19-tm srfi-19-io)
    5555    (csc-options "-O3" "-d1" "-strict-types" "-no-procedure-checks" "-no-bound-checks"))
    56   (extension srfi-19-tmctm
    57     (types-file)
    58     (csc-options "-O4" "-d0" "-strict-types" "-no-procedure-checks" "-no-bound-checks" "-no-argc-checks"))
    5956  (extension srfi-19-tm
    6057    (types-file)
    61     (component-dependencies srfi-19-timezone srfi-19-tmctm)
     58    (component-dependencies srfi-19-timezone)
    6259    (csc-options "-O4" "-d0" "-strict-types" "-no-procedure-checks" "-no-bound-checks" "-no-argc-checks"))
    6360  (extension srfi-19-timezone
Note: See TracChangeset for help on using the changeset viewer.