+2001-10-07 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-misc.el (liece-subtract-time): New function.
+ (liece-time-difference): Use it.
+
2001-10-05 Daiki Ueno <ueno@unixuser.org>
* liece-misc.el (liece-time-difference): Fix the arglist.
found))
;;; stolen (and renamed) from time-date.el.
-(defun liece-time-difference (t1 t2)
+(defun liece-subtract-time (t1 t2)
"Subtract two internal times."
(let ((borrow (< (cadr t1) (cadr t2))))
(list (- (car t1) (car t2) (if borrow 1 0))
(- (+ (if borrow 65536 0) (cadr t1)) (cadr t2)))))
+(defun liece-time-difference (t1 t2)
+ "Return the differnce between two internal times in seconds."
+ (let ((sub (liece-subtract-time t1 t2)))
+ (+ (* (car sub) 65536) (cadr sub))))
+
(defun liece-time-elapsed (time seconds)
"Add SECONDS to TIME."
(list (+ (car time) (/ (+ (cadr time) seconds) 65536))