Re: [CM] s7 does not measure seconds correctly

2022-11-30 Thread Rudolf Adamkovič
b...@ccrma.stanford.edu writes: > (define (jiffies-per-second) 10) > (define (current-jiffy) >(with-let *libc* > (let ((res (clock_gettime CLOCK_MONOTONIC))) >(+ (* 10 (cadr res)) (caddr res) > (define (current-second) (* 1.0 ((*libc* 'time) (c-pointer 0 >

Re: [CM] s7 does not measure seconds correctly

2022-11-30 Thread bil
argh I clicked the wrong damn button (define (jiffies-per-second) 10) (define (current-jiffy) (with-let *libc* (let ((res (clock_gettime CLOCK_MONOTONIC))) (+ (* 10 (cadr res)) (caddr res) (define (current-second) (* 1.0 ((*libc* 'time) (c-pointer 0 'time_t*

Re: [CM] s7 does not measure seconds correctly

2022-11-30 Thread bil
For awhile the thing currently called (*s7* 'cpu-time) was returning the wall clock time by accident. I think the r7rs.scm functions should be: ___ Cmdist mailing list Cmdist@ccrma.stanford.edu https://cm-mail.stanford.edu/mailman/listinfo/cmdist

[CM] s7 does not measure seconds correctly

2022-11-30 Thread Rudolf Adamkovič
Observation: $ ./s7 λ (current-second) 0 λ (current-second) ; about a minute later 0 The definition in s7: (define (current-second) (floor (*s7* 'cpu-time))) Executing `(*s7* 'cpu-time)' about 1 second apart: $ ./s7 λ (*s7* 'cpu-time) 0.009856 λ (*s7* 'cpu-time) 0.010111