Changeset 33883 in project


Ignore:
Timestamp:
03/05/17 15:38:09 (7 months ago)
Author:
kon
Message:

fix nano sqrd issue when making time

Location:
release/4/srfi-19
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/srfi-19/tags/3.4.1/srfi-19-support.scm

    r33841 r33883  
    561561
    562562(define-inline (normalize-timeval t t/t+1)
    563   (values (* (remainder t t/t+1) t/t+1) (quotient t t/t+1)) )
     563  (values (remainder t t/t+1) (quotient t t/t+1)) )
    564564
    565565(define (normalize-nanoseconds ns)
     
    766766; Throw away everything but the sub-second bit.
    767767;
    768 (define-syntax tm:current-sub-milliseconds
    769         (syntax-rules ()
    770                 ((_)
    771       (inexact->exact (remainder (current-milliseconds) MS/S)) ) ) )
     768(define (tm:current-sub-milliseconds)
     769        (inexact->exact (remainder (current-milliseconds) MS/S)) )
    772770
    773771(define (tm:current-nanoseconds)
     
    784782        (syntax-rules ()
    785783                ((_)
    786       (let-values (((ns sec) (tm:current-time-values)))
    787         (tm:make-time 'utc ns sec)) ) ) )
     784                  (let-values (((ns sec) (tm:current-time-values)))
     785        (tm:make-time 'utc ns sec) ) ) ) )
    788786
    789787(define-syntax tm:current-time-tai
     
    16311629        (yr (%date-year dat))
    16321630        (tzo (%date-zone-offset dat)) )
    1633     (let ((jdys (- (tm:encode-julian-day-number dy mn yr) TAI-EPOCH-IN-JD))
    1634           (secs (fx+ (fx+ (fx* hr SEC/HR) (fx+ (fx* min SEC/MIN) sec)) (fxneg tzo))) )
     1631    (let ((jdys
     1632            (-
     1633              (tm:encode-julian-day-number dy mn yr)
     1634              TAI-EPOCH-IN-JD))
     1635          (secs
     1636            (fx+
     1637              (fx+
     1638                (fx* hr SEC/HR)
     1639                (fx+
     1640                  (fx* min SEC/MIN)
     1641                  sec))
     1642              (fxneg tzo))) )
    16351643      (tm:make-time 'utc ns (+ (* (- jdys ONE-HALF) SEC/DY) secs)) ) ) )
    16361644
  • release/4/srfi-19/tags/3.4.1/srfi-19.setup

    r32146 r33883  
    1212(install-srfi-29-bundle 'srfi-19 'pt 'br)
    1313
    14 (setup-shared-extension-module 'srfi-19-timezone (extension-version "3.3.6")
     14(setup-shared-extension-module 'srfi-19-timezone (extension-version "3.4.1")
    1515        #:inline? #t
    1616        #:types? #t
    1717  #:compile-options '(-fixnum-arithmetic -optimize-level 3 -no-procedure-checks))
    1818
    19 (setup-shared-extension-module 'srfi-19-support (extension-version "3.3.6")
     19(setup-shared-extension-module 'srfi-19-support (extension-version "3.4.1")
    2020        #:inline? #t
    2121        #:types? #t
     
    2424    -no-procedure-checks -no-bound-checks -no-argc-checks))
    2525
    26 (setup-shared-extension-module 'srfi-19-time (extension-version "3.3.6")
     26(setup-shared-extension-module 'srfi-19-time (extension-version "3.4.1")
    2727        #:inline? #t
    2828        #:types? #t
    2929  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3030
    31 (setup-shared-extension-module 'srfi-19-date (extension-version "3.3.6")
     31(setup-shared-extension-module 'srfi-19-date (extension-version "3.4.1")
    3232        #:inline? #t
    3333        #:types? #t
    3434  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3535
    36 (setup-shared-extension-module 'srfi-19-io (extension-version "3.3.6")
     36(setup-shared-extension-module 'srfi-19-io (extension-version "3.4.1")
    3737        #:inline? #t
    3838        #:types? #t
    3939  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4040
    41 (setup-shared-extension-module 'srfi-19-period (extension-version "3.3.6")
     41(setup-shared-extension-module 'srfi-19-period (extension-version "3.4.1")
    4242        #:inline? #t
    4343        #:types? #t
    4444  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4545
    46 (setup-shared-extension-module 'srfi-19-core (extension-version "3.3.6")
     46(setup-shared-extension-module 'srfi-19-core (extension-version "3.4.1")
    4747        #:inline? #t
    4848        #:types? #t
    4949  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    5050
    51 (setup-shared-extension-module 'srfi-19 (extension-version "3.3.6")
     51(setup-shared-extension-module 'srfi-19 (extension-version "3.4.1")
    5252        #:inline? #t
    5353        #:types? #t
  • release/4/srfi-19/trunk/srfi-19-support.scm

    r33841 r33883  
    561561
    562562(define-inline (normalize-timeval t t/t+1)
    563   (values (* (remainder t t/t+1) t/t+1) (quotient t t/t+1)) )
     563  (values (remainder t t/t+1) (quotient t t/t+1)) )
    564564
    565565(define (normalize-nanoseconds ns)
     
    766766; Throw away everything but the sub-second bit.
    767767;
    768 (define-syntax tm:current-sub-milliseconds
    769         (syntax-rules ()
    770                 ((_)
    771       (inexact->exact (remainder (current-milliseconds) MS/S)) ) ) )
     768(define (tm:current-sub-milliseconds)
     769        (inexact->exact (remainder (current-milliseconds) MS/S)) )
    772770
    773771(define (tm:current-nanoseconds)
     
    784782        (syntax-rules ()
    785783                ((_)
    786       (let-values (((ns sec) (tm:current-time-values)))
    787         (tm:make-time 'utc ns sec)) ) ) )
     784                  (let-values (((ns sec) (tm:current-time-values)))
     785        (tm:make-time 'utc ns sec) ) ) ) )
    788786
    789787(define-syntax tm:current-time-tai
     
    16311629        (yr (%date-year dat))
    16321630        (tzo (%date-zone-offset dat)) )
    1633     (let ((jdys (- (tm:encode-julian-day-number dy mn yr) TAI-EPOCH-IN-JD))
    1634           (secs (fx+ (fx+ (fx* hr SEC/HR) (fx+ (fx* min SEC/MIN) sec)) (fxneg tzo))) )
     1631    (let ((jdys
     1632            (-
     1633              (tm:encode-julian-day-number dy mn yr)
     1634              TAI-EPOCH-IN-JD))
     1635          (secs
     1636            (fx+
     1637              (fx+
     1638                (fx* hr SEC/HR)
     1639                (fx+
     1640                  (fx* min SEC/MIN)
     1641                  sec))
     1642              (fxneg tzo))) )
    16351643      (tm:make-time 'utc ns (+ (* (- jdys ONE-HALF) SEC/DY) secs)) ) ) )
    16361644
  • release/4/srfi-19/trunk/srfi-19.setup

    r32146 r33883  
    1212(install-srfi-29-bundle 'srfi-19 'pt 'br)
    1313
    14 (setup-shared-extension-module 'srfi-19-timezone (extension-version "3.3.6")
     14(setup-shared-extension-module 'srfi-19-timezone (extension-version "3.4.1")
    1515        #:inline? #t
    1616        #:types? #t
    1717  #:compile-options '(-fixnum-arithmetic -optimize-level 3 -no-procedure-checks))
    1818
    19 (setup-shared-extension-module 'srfi-19-support (extension-version "3.3.6")
     19(setup-shared-extension-module 'srfi-19-support (extension-version "3.4.1")
    2020        #:inline? #t
    2121        #:types? #t
     
    2424    -no-procedure-checks -no-bound-checks -no-argc-checks))
    2525
    26 (setup-shared-extension-module 'srfi-19-time (extension-version "3.3.6")
     26(setup-shared-extension-module 'srfi-19-time (extension-version "3.4.1")
    2727        #:inline? #t
    2828        #:types? #t
    2929  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3030
    31 (setup-shared-extension-module 'srfi-19-date (extension-version "3.3.6")
     31(setup-shared-extension-module 'srfi-19-date (extension-version "3.4.1")
    3232        #:inline? #t
    3333        #:types? #t
    3434  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    3535
    36 (setup-shared-extension-module 'srfi-19-io (extension-version "3.3.6")
     36(setup-shared-extension-module 'srfi-19-io (extension-version "3.4.1")
    3737        #:inline? #t
    3838        #:types? #t
    3939  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4040
    41 (setup-shared-extension-module 'srfi-19-period (extension-version "3.3.6")
     41(setup-shared-extension-module 'srfi-19-period (extension-version "3.4.1")
    4242        #:inline? #t
    4343        #:types? #t
    4444  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    4545
    46 (setup-shared-extension-module 'srfi-19-core (extension-version "3.3.6")
     46(setup-shared-extension-module 'srfi-19-core (extension-version "3.4.1")
    4747        #:inline? #t
    4848        #:types? #t
    4949  #:compile-options '(-optimize-level 3 -no-procedure-checks))
    5050
    51 (setup-shared-extension-module 'srfi-19 (extension-version "3.3.6")
     51(setup-shared-extension-module 'srfi-19 (extension-version "3.4.1")
    5252        #:inline? #t
    5353        #:types? #t
Note: See TracChangeset for help on using the changeset viewer.