From a4df9bffb24b84322b139d1934991d3ce8e2c1f9 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 19 Oct 2017 11:33:57 -0400 Subject: scripting: agenda: Add reset-agenda procedure. * chickadee/scripting/agenda.scm (reset-agenda): New procedure. --- chickadee/scripting/agenda.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chickadee/scripting/agenda.scm b/chickadee/scripting/agenda.scm index f16dc45..83cb4b7 100644 --- a/chickadee/scripting/agenda.scm +++ b/chickadee/scripting/agenda.scm @@ -26,6 +26,7 @@ agenda-time update-agenda clear-agenda + reset-agenda schedule-at schedule-after schedule-every @@ -83,6 +84,12 @@ "Remove all scheduled tasks from the current agenda." (%agenda-clear! (current-agenda))) +(define (reset-agenda) + "Remove all scheduled tasks from the current agenda and reset time +to 0." + (%agenda-clear! (current-agenda)) + (set-agenda-time! (current-agenda) 0)) + (define (update-agenda dt) "Advance the current agenda by DT." (%update-agenda (current-agenda) dt)) -- cgit v1.2.3