help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minibuffer tray to display current time and date


From: Eli Zaretskii
Subject: Re: Minibuffer tray to display current time and date
Date: Sun, 26 Apr 2015 17:48:13 +0300

> From: address@hidden (Jorge A. Alfaro-Murillo)
> Date: Sat, 25 Apr 2015 22:38:48 -0400
> 
> Dan Espen writes:
> 
> > address@hidden (Jorge A. Alfaro-Murillo) writes: 
> > 
> >> Thanks... I see, it seems like every time that the 
> >> display-timer  runs it updates its interval. That doesn't seem 
> >> very efficient,  but there could be a good reason why they did 
> >> it that way. 
> > 
> > How is that not efficient? 
> > 
> > That's exactly the way I did it about 30 years ago on an IBM 
> > mainframe. Works for anything you want running at a regular 
> > interval.  First pop is 60 seconds. Odds are, it will pop at 61, 
> > or even 62 depending on system load, etc. So, the next wait 
> > should be 60, 59, or 58.
> 
> Well, I think that (run-at-time time repeat ...) already schedules 
> the times to run at the correct times even if one is late, so 
> there is no need to reschedule again even if the system load is 
> high and misses one timing or more.

It's not a problem with system load, it's a problem with _when_ within
the minute does the timer run.  Scheduling it to run every 60 sec
doesn't guarantee that it will run exactly when the minutes advance.
So, if you are unlucky, your time shown in the echo area can be 59 sec
late.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]