Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User shizzl's Avatar
    Join Date
    Mar 2012
    Posts
    60
    hi,

    i have a problem with the RTimer At functionality.
    I implemented a timer in my app (timer example).

    The problem is, that i get no callback, when i use TTimeIntervalHours?
    When i use TTimeIntervalSeconds or TTimeIntervalMinutes everything is working fine!

    What could be the problem here? (5th SDK)


    timer gets called like this:
    Code:
    		 TTime now; 
    		 now.HomeTime();  
    		 now+=TTimeIntervalHours(1); 		  
    		 myTimer->At(now);
    Code:
    void CExampleTimer::At(const TTime& aTime)
    {
    	Cancel();
    	iTimer.At(iStatus,aTime);
    	SetActive();

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Timer functions relate to GMT starting from Symbian OS v9.x / S60 3rd edition. So try the same with UniversalTime.

  3. #3
    Nokia Developer Champion pavarang's Avatar
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    574
    And please also note KErrAbort error when system time updates (it could easily happen when time interval is wide):
    http://www.developer.nokia.com/Commu...CTimer-problem
    post #4

  4. #4
    Registered User shizzl's Avatar
    Join Date
    Mar 2012
    Posts
    60
    And please also note KErrAbort error when system time updates (it could easily happen when time interval is wide):
    i know about it. what do you mean with "when time interval is wide"??

    I thought system time updates will not happen very ofthen?

    @ wizard_hu_
    thanks i will try and report back

  5. #5
    Nokia Developer Champion pavarang's Avatar
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    574
    Quote Originally Posted by shizzl View Post

    I thought system time updates will not happen very ofthen?
    I remember that for me was once every one/two hour(s) when i discovered it... and maybe your timer could start near the end of an update interval... but if you already know it and you are prepared, the frequency of the time updates is not a problem :-)
    regards
    pg

  6. #6
    Registered User shizzl's Avatar
    Join Date
    Mar 2012
    Posts
    60
    now i understand, i thought system time updates mean, if user changes it manually, or similar.
    But if i got you right there are peridoic time updates that cause the timmer to return KErrAbort.

    So i will have to check for KErrAbort and recalculate the remaining time.

    This is symbian C++, why make it easy, when it can be complicated...

  7. #7
    Nokia Developer Expert OviBron's Avatar
    Join Date
    Jun 2010
    Posts
    24
    Once upon a time there was an Indian network that would send a time update to a phone every time a packet data connection was established.

  8. #8
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    Oh, I completely forgot the KErrAbort thing, though that is a kind of completion, just premature.
    The link is somehow broken in #3, but chances are that Pavarang means http://www.developer.nokia.com/Commu...CTimer-problem

  9. #9
    Nokia Developer Champion pavarang's Avatar
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    574
    Quote Originally Posted by shizzl View Post
    now i understand, i thought system time updates mean, if user changes it manually, or similar.
    It's automatic, if the user set it "on" somewhere into phone settings.

    Quote Originally Posted by shizzl View Post
    But if i got you right there are peridoic time updates that cause the timmer to return KErrAbort.

    So i will have to check for KErrAbort and recalculate the remaining time.
    I think no need to recalculate, simply save and re-apply the TTime value.

    Quote Originally Posted by wizard_hu_ View Post
    The link is somehow broken in #3, but chances are that Pavarang means http://www.developer.nokia.com/Commu...CTimer-problem
    Yes, thank you for the right link. Something went wrong in copy/paste from browser.

Similar Threads

  1. How to wait CancellableTask to finish?
    By iamjavanese in forum Mobile Java General
    Replies: 3
    Last Post: 2010-01-28, 16:44
  2. PKG file with Finish text
    By gpalvia in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2009-03-11, 13:33
  3. Loading jpg, know when finish.
    By metRo_ in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2008-11-17, 22:04
  4. Waiting for a CActive object to finish
    By yaront in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2004-12-29, 12:34
  5. one sms finish mms notification?
    By Nokia_Archive in forum General Messaging
    Replies: 1
    Last Post: 2002-05-23, 13:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved