Add repl.scm (can't believe I forgot it before!) and use it in irc.scm
[8sync.git] / eightsync / agenda.scm
index e4cb1dfd1ca9ced0e90387e71f7f1d3e24facfef..2b46324bfe7a30f2c94af2281c28906374d585f6 100644 (file)
@@ -150,6 +150,9 @@ Generally done automatically for the user through (make-agenda)."
   (time time-segment-time)
   (queue time-segment-queue))
 
+;; @@: This seems to be the same as srfi-18's seconds->time procedure?
+;;   Maybe double check and switch to that?  (Thanks amz3!)
+
 (define (time-from-float-or-fraction time)
   "Produce a (sec . usec) pair from TIME, a float or fraction"
   (let* ((mixed-whole (floor time))
@@ -245,13 +248,13 @@ Will produce (0 . 0) instead of a negative number, if needed."
   "Subtract TIME2 from TIME1"
   (time-carry-correct
    (cons (- (car time1) (car time2))
-         (- (cdr time2) (cdr time2)))))
+         (- (cdr time1) (cdr time2)))))
 
 (define (time-plus time1 time2)
   "Add TIME1 and TIME2"
   (time-carry-correct
    (cons (+ (car time1) (car time2))
-         (+ (cdr time2) (cdr time2)))))
+         (+ (cdr time1) (cdr time2)))))
 
 
 (define-record-type <schedule>