From: Christopher Allan Webber Date: Fri, 20 Nov 2015 01:06:23 +0000 (-0600) Subject: provide a key to start-agenda for a user-supplied way to provide a key X-Git-Tag: v0.1.0~141 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=46395baa30d0d6d0b1f0a21a5a6171ebb1f35e6e;p=8sync.git provide a key to start-agenda for a user-supplied way to provide a key --- diff --git a/loopy.scm b/loopy.scm index 99741c4..d5d30c7 100644 --- a/loopy.scm +++ b/loopy.scm @@ -303,7 +303,9 @@ (define %current-agenda (make-parameter #f)) -(define* (start-agenda agenda #:key stop-condition) +(define* (start-agenda agenda + #:key stop-condition + (get-time gettimeofday)) (let loop ((agenda agenda)) (let ((agenda ;; @@: Hm, maybe here would be a great place to handle @@ -313,7 +315,7 @@ (agenda-run-once agenda)))) (if (and stop-condition (stop-condition agenda)) 'done - (let* ((new-time (gettimeofday)) + (let* ((new-time (get-time)) (agenda ;; Adjust the agenda's time just in time ;; We do this here rather than in agenda-run-once to make