Re: Synchronising an app with the system clock
- From: Alex Jones <alex weej com>
- To: desktop-devel-list gnome org
- Subject: Re: Synchronising an app with the system clock
- Date: Thu, 15 Feb 2007 18:30:51 +0000
Hi Andrew
Thanks for your thoughts, very useful info.
Back on the thought of a "system clock" D-Bus service, how does this
sound? (Sorry to reiterate some info.)
It could emit signals every second, on the second, so as to synchronise
the entire system. This would be along the lines of "time is now
18:21:39". If the clock is adjusted (the daemon should know about it
because it should be the proxy for such an action, or if the clock
changed for unknown reasons a recovery process could be invoked), all
that it takes is to send the "time is now..." signal again with the new
time, and try to resync the timing of wakeups.
All apps that are concerned with second-resolution timing could monitor
this signal, or perhaps request wakeups from the daemon at specific
intervals or times.
It could also expose functionality to control the system clock (either
manually or by requesting NTP sync.), and emit signals when adjustments
are made. Basically, this would be like a "Network Manager" for the
clock!
Potential clients of this could be:
* Clock Applet
* time-admin
* Screensaver
* Cron
* My silly little alarm thing
Anything that requires sub-second resolution timing can simply poll the
clock itself without using the daemon.
Perhaps, though, it would a good idea to make it dynamic in nature, such
that it emits signals to subscriber applications based on their needs.
I.e. if the Clock Applet isn't showing seconds, it only needs to be
notified at h:m:00.000 (i.e. once per minute, exactly on the minute),
but if it /is/ showing seconds, it wants to be notified at h:m:s.000
(i.e. once per second, exactly on the second).
I'd quite like to work on this if people are generally in agreement.
Any further ideas/comments?
Cheers
--
Alex Jones
http://alex.weej.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]