From beabb71e249c36d59f0b45eccfa8b926f4148f68 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 7 Oct 2001 05:44:03 +0000 Subject: [PATCH] * liece-misc.el (liece-subtract-time): New function. (liece-time-difference): Use it. --- lisp/liece-misc.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/liece-misc.el b/lisp/liece-misc.el index 51830c2..e479e43 100644 --- a/lisp/liece-misc.el +++ b/lisp/liece-misc.el @@ -432,12 +432,17 @@ 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)) -- 1.7.10.4