|
|
|
@ -29,5 +29,7 @@
|
|
|
|
;; Normalize the time tm to be the next step sized increment from base.
|
|
|
|
;; Normalize the time tm to be the next step sized increment from base.
|
|
|
|
;; All time arguments are expected to be a time in seconds
|
|
|
|
;; All time arguments are expected to be a time in seconds
|
|
|
|
(define (step-from base step tm)
|
|
|
|
(define (step-from base step tm)
|
|
|
|
(let ((steps (truncate-quotient (- tm base) step)))
|
|
|
|
(let ((steps (truncate-quotient (abs (- tm base)) step)))
|
|
|
|
(+ base (* step (+ 1 steps)))))
|
|
|
|
(+ base (* step (+ 1 steps)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|