From: ueno Date: Sun, 7 Oct 2001 05:46:34 +0000 (+0000) Subject: Synch up with liece-1_4. X-Git-Tag: liece-2_0_0-pre1~7 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d38f2652f3ec79c20d926c2bf81d585a6645ed;p=elisp%2Fliece.git Synch up with liece-1_4. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd5eaaf..46efc2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-10-07 Daiki Ueno + + * liece-misc.el (liece-subtract-time): New function. + (liece-time-difference): Use it. + 2001-10-05 Daiki Ueno * liece-misc.el (liece-time-difference): Fix the arglist. 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))