From mboxrd@z Thu Jan 1 00:00:00 1970 Path: quimby.gnus.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.devel Subject: Patch for timer-relative-time Date: Wed, 13 Feb 2002 15:21:12 +0200 Organization: Mivtach-Simon Insurance agencies Message-ID: <200202131321.g1DDLCB17492@unix.simonwiesel.co.il> Reply-To: ehud@unix.simonwiesel.co.il NNTP-Posting-Host: quimby2.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 7bit X-Trace: quimby2.netfonds.no 1013607349 5565 195.204.10.66 (13 Feb 2002 13:35:49 GMT) X-Complaints-To: usenet@quimby2.netfonds.no NNTP-Posting-Date: 13 Feb 2002 13:35:49 GMT Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby2.netfonds.no with esmtp (Exim 3.12 #1 (Debian)) id 16azZc-0001Rf-00 for ; Wed, 13 Feb 2002 14:35:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16azOK-0007dV-00; Wed, 13 Feb 2002 08:24:08 -0500 Original-Received: from unix.simonwiesel.co.il ([192.114.178.12] helo=bsw1.) by fencepost.gnu.org with esmtp (Exim 3.33 #1 (Debian)) id 16azLz-0007ad-00 for ; Wed, 13 Feb 2002 08:21:44 -0500 Original-Received: from unix.simonwiesel.co.il (beta [10.253.0.3]) by bsw1. (8.9.3/8.9.3) with ESMTP id PAA09117 for ; (rcv ); śWed, 13 Feb 2002 15:21:38 +0200 Original-Received: (from ehud@localhost) by unix.simonwiesel.co.il (8.11.6/8.11.4) id g1DDLCB17492; Wed, 13 Feb 2002 15:21:12 +0200 Original-To: emacs-devel@gnu.org X-Mailer: Emacs 21.1.1 rmail (send-msg 1.106) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: quimby.gnus.org gmane.emacs.devel:1061 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1061 On 2001-05-14 I submitted a patch for `timer-relative-time' that dealt with case of negative increment. (see - http://mail.gnu.org/pipermail/bug-gnu-emacs/2001-May/005721.html ) It did not get into emacs 21.1, I hope someone (Eli ?) will put it in before emacs 21.2 is out. Ehud. cd ~/site-lisp/ diff -c /usr/local/share/emacs/21.1/lisp/timer.el /procom/home/ehud/site-lisp/timer.el *** /usr/local/share/emacs/21.1/lisp/timer.el Sun Jul 15 19:15:34 2001 --- /procom/home/ehud/site-lisp/timer.el Wed Feb 13 13:15:29 2002 *************** *** 117,128 **** ;; Normalize (setq low (+ low (/ micro 1000000))) (setq micro (mod micro 1000000)) (setq high (+ high (/ low 65536))) (setq low (logand low 65535)) - (list high low (and (/= micro 0) micro)))) (defun timer-inc-time (timer secs &optional usecs) "Increment the time set in TIMER by SECS seconds and USECS microseconds. SECS may be a fraction." --- 117,132 ---- ;; Normalize (setq low (+ low (/ micro 1000000))) + (if (< micro 0) + (setq low (1- low))) (setq micro (mod micro 1000000)) (setq high (+ high (/ low 65536))) + (if (< low 0) + (setq high (1- high))) (setq low (logand low 65535)) (list high low (and (/= micro 0) micro)))) (defun timer-inc-time (timer secs &optional usecs) "Increment the time set in TIMER by SECS seconds and USECS microseconds. SECS may be a fraction." Exit 1 Diff finished at Wed Feb 13 13:17:21 -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ mailto:ehud@unix.simonwiesel.co.il Better Safe Than Sorry _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel