[maemo-developers] sensing change in System Clock using Qt

From: ibrahim ibrahim.ali at asgatech.com
Date: Sun Jan 24 11:55:32 EET 2010

I am creating a Qt application that depends on system clock (get the 
current system time/date) to do time-dependent calculations. (calculate 
duration from current time to a specifed/calculated duration in the 
future, and set a QTimer's interval to that duration).

But the problem that can face me is the case when the user changes his 
clock settings (i.e adjust phone's time to a different time). in this 
case, the timer that has been set to some fixed duration can go wrong.

One solution i figured is to check for system time change every fixed 
period (say a minute). But it seems a very ugly one since it is bad for 
performance and not handy (wait for the next minute to come to check for 
the clock and realize it was changed)

my question is: is there any way to get notified by the system clock of 
any change/adjustments ? any signals sent by the system phone or 
something like that ?

thanx in advance
More information about the maemo-developers mailing list