agenda: Major cleanup.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Tue, 27 Dec 2016 20:17:42 +0000 (14:17 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 28 Dec 2016 16:11:11 +0000 (10:11 -0600)
commitb387687cfe0aea2f5461bb211b627ce072364ad4
tree7a4804e38d2d7d6efe016b26f6bcfae1c298750a
parent6a8dc6f801cc08e1b92dce53fc8a3758c9b0718a
agenda: Major cleanup.

* 8sync/agenda.scm (<agenda>, make-agenda, agenda-time): Move from being
an immutable-record-type to just a regular one.  Add set-agenda-queue!
and remove time slot.
(time-from-float-or-fraction, time-segment-right-format, <time-delta>)
(make-time-delta, tdelta, time-delta+, 8usleep): Removed.
(schedule-add!, schedule-segments-split): Remove let shadowing of time.
There's no need to always convert the time format since it should now be
correct by the time it gets here.
(delayed-time): New variable.
(run-delay, 8sleep): Use delayed-time.
(update-agenda-from-select!): Use gettimeofday instead of agenda-time.
(start-agenda): Remove get-time and handle-ports keyword arguments.
Simplify loop considerably.
(agenda-run-once!): Renamed from agenda-run-once.  Simplify the enqueue
part of the code since we've constrained what an acceptable time value
looks like.  Use set-agenda-queue!.

* tests/test-agenda: Update for changes to agenda.scm.
8sync/agenda.scm
tests/test-agenda.scm