From 0579b5320ed173a2e9711cc69b0848fa446e9c83 Mon Sep 17 00:00:00 2001 From: Brady McDonough Date: Thu, 4 Feb 2021 01:32:15 -0700 Subject: [PATCH] Fixed an inconsistency --- tk/listlogic.scm | 1 + tk/mcron.scm | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tk/listlogic.scm b/tk/listlogic.scm index 5e11bbe..e51af53 100644 --- a/tk/listlogic.scm +++ b/tk/listlogic.scm @@ -45,3 +45,4 @@ (define (l& ls1 ls2) (cond ((eqv? ls1 ls2) ls1) (else (lp& eqv? ls1 ls2)))) + diff --git a/tk/mcron.scm b/tk/mcron.scm index 4c56f25..82d4d41 100644 --- a/tk/mcron.scm +++ b/tk/mcron.scm @@ -29,5 +29,7 @@ ;; Normalize the time tm to be the next step sized increment from base. ;; All time arguments are expected to be a time in seconds (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))))) + +