GNU bug report logs - #5822
run-at-time and Setting system time

Previous Next

Package: emacs;

Reported by: chandan <chandan.babu <at> globaledgesoft.com>

Date: Fri, 2 Apr 2010 07:03:02 UTC

Severity: normal

Tags: notabug

Merged with 5823

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5822 in the body.
You can then email your comments to 5822 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5822; Package emacs. (Fri, 02 Apr 2010 07:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to chandan <chandan.babu <at> globaledgesoft.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 02 Apr 2010 07:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: chandan <chandan.babu <at> globaledgesoft.com>
To: help-gnu-emacs <at> gnu.org, bug-gnu-emacs <at> gnu.org
Subject: run-at-time and Setting system time
Date: Fri, 02 Apr 2010 12:29:42 +0530
Hi,
   Consider the following code:

(defun mwnn-timer-callback ()
 (message "Hi, inside mwnn-timer-callback"))

(run-at-time "60" nil 'mwnn-timer-callback)

The above code is supposed to cause mwnn-timer-callback to get invoked 
after 60 seconds. But if the system time is changed to a future date 
(say 20 seconds after the timer is started) the timer fires immediately.

Is this is a bug in the emacs code. If yes, can this be rectified?

Regards,
mwnn





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5822; Package emacs. (Fri, 02 Apr 2010 17:42:01 GMT) Full text and rfc822 format available.

Message #8 received at 5822 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: chandan <chandan.babu <at> globaledgesoft.com>
Cc: 5822 <at> debbugs.gnu.org, help-gnu-emacs <at> gnu.org
Subject: Re: bug#5822: run-at-time and Setting system time
Date: Fri, 02 Apr 2010 20:40:26 +0300
> Date: Fri, 02 Apr 2010 12:29:42 +0530
> From: chandan <chandan.babu <at> globaledgesoft.com>
> Cc: 
> 
> (defun mwnn-timer-callback ()
>   (message "Hi, inside mwnn-timer-callback"))
> 
> (run-at-time "60" nil 'mwnn-timer-callback)
> 
> The above code is supposed to cause mwnn-timer-callback to get invoked 
> after 60 seconds. But if the system time is changed to a future date 
> (say 20 seconds after the timer is started) the timer fires immediately.
> 
> Is this is a bug in the emacs code. If yes, can this be rectified?

I think this how the timers are supposed to behave.  They are not
interval timers, if that's what you expected.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5822; Package emacs. (Fri, 02 Apr 2010 18:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 5822 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: chandan <chandan.babu <at> globaledgesoft.com>
Cc: 5822 <at> debbugs.gnu.org, help-gnu-emacs <at> gnu.org
Subject: Re: bug#5822: run-at-time and Setting system time
Date: Fri, 02 Apr 2010 14:55:25 -0400
Please don't cross-post to the help and bug lists.

Anyone reading this on help-gnu-emacs, please use 5822 at
debbugs.gnu.org in place of bug-gnu-emacs in any replies. (Otherwise
every reply creates a new bug report.)


If you really want to cc another address when filing a new bug report,
please use an X-Debbugs-CC header instead of a Cc header, as explained
here:

http://debbugs.gnu.org/Reporting.html#xcc

Yes, it is a bit confusing at first.

Thanks.




Merged 5822 5823. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 03 Apr 2010 19:25:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5822; Package emacs. (Mon, 05 Apr 2010 03:44:01 GMT) Full text and rfc822 format available.

Message #16 received at 5822 <at> debbugs.gnu.org (full text, mbox):

From: chandan <chandan.babu <at> globaledgesoft.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 5822 <at> debbugs.gnu.org, help-gnu-emacs <at> gnu.org
Subject: Re: bug#5822: run-at-time and Setting system time
Date: Sun, 05 Apr 2009 09:14:35 +0530
Eli Zaretskii wrote:
>> Date: Fri, 02 Apr 2010 12:29:42 +0530
>> From: chandan <chandan.babu <at> globaledgesoft.com>
>> Cc: 
>>
>> (defun mwnn-timer-callback ()
>>   (message "Hi, inside mwnn-timer-callback"))
>>
>> (run-at-time "60" nil 'mwnn-timer-callback)
>>
>> The above code is supposed to cause mwnn-timer-callback to get invoked 
>> after 60 seconds. But if the system time is changed to a future date 
>> (say 20 seconds after the timer is started) the timer fires immediately.
>>
>> Is this is a bug in the emacs code. If yes, can this be rectified?
>>     
>
> I think this how the timers are supposed to behave.  They are not
> interval timers, if that's what you expected.
>
>   
Emacs seems to use setitimer & getitimer (interval timers) for 
implementing the timer module. This may be the cause of the problem. 
Using timer_create, timer_delete, timer_settime, timer_gettime etc.





Added tag(s) notabug. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 20:12:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 5823 <at> debbugs.gnu.org and david <at> adboyd.com (J. David Boyd) Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 20:12:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Oct 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.