This page was last modified 15:09, 7 May 2008.
Getting Notification of System Time Change
From Forum Nokia Wiki
For getting the Notification of System Time Change, we can use RTimers.
The At timers terminates with KErrAbort when the system time changes, the timer can be used to monitor changes in system time.
Implement a simple Active Object and Use RTimer to get notification of System Change.
To get complete idea about Active Object with example refer [Active Objects] Section on WIKI.
TTime CurrentTime; CurrentTime.HomeTime(); // Issue an Asynchronous Request // iTimeWaster.At(iStatus, CurrentTime + TTimeIntervalYears(2)); // set it to active once request is issued // SetActive();
Now in the RunL() of your Active Object, you can catch KErrAbort when the System Time is changed, as timer will terminate with KErrAbort when the system time is changed.
void CSomeActiveObject::RunL() { // This is the case when system time is changed and // hence will cause the timer to abort with KErrAbort. if(iStatus.Int() == KErrAbort) { // Do Something ... } }
For testing the System Time Change Notification, you can run your program in the background and change the system time from Tools >> Clock >> Settings >>Time, your RunL() method will be called with iStatus = KErrAbort.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Time & Date Reset (in SIM card change) | aliabbas | General Discussion | 1 | 2007-06-14 08:04 |
| one sms finish mms notification? | Nokia_Archive | General Messaging | 1 | 2002-05-23 13:06 |
| How to change system layouts to landscape mode on OS 9.2? | Mozart2007 | Symbian User Interface | 2 | 2007-11-13 08:57 |
| Displaying only the signal pane | santosh shetty | Symbian User Interface | 4 | 2006-12-15 05:04 |
| No email notification on subscribed threads | iulian_moldovan | Developer Resources Feedback (Documentation, Examples, Training) | 5 | 2006-09-20 18:06 |
