RTimer At does not finish?
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]
[CODE]void CExampleTimer::At(const TTime& aTime)
{
Cancel();
iTimer.At(iStatus,aTime);
SetActive();[/CODE]
Re: RTimer At does not finish?
Timer functions relate to GMT starting from Symbian OS v9.x / S60 3rd edition. So try the same with UniversalTime.
Re: RTimer At does not finish?
And please also note KErrAbort error when system time updates (it could easily happen when time interval is wide):
[url]http://www.developer.nokia.com/Commu...CTimer-problem[/url]
post #4
Re: RTimer At does not finish?
[QUOTE]And please also note KErrAbort error when system time updates (it could easily happen when time interval is wide):[/QUOTE]
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
Re: RTimer At does not finish?
[QUOTE=shizzl;907463]
I thought system time updates will not happen very ofthen?
[/QUOTE]
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
Re: RTimer At does not finish?
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... ;)
Re: RTimer At does not finish?
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.
Re: RTimer At does not finish?
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 [url]http://www.developer.nokia.com/Community/Discussion/showthread.php?178375-CTimer-problem[/url]
Re: RTimer At does not finish?
[QUOTE=shizzl;907465]now i understand, i thought system time updates mean, if user changes it manually, or similar.[/QUOTE]
It's automatic, if the user set it "on" somewhere into phone settings.
[QUOTE=shizzl;907465]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.[/QUOTE]
I think no need to recalculate, simply save and re-apply the TTime value.
[QUOTE=wizard_hu_;907471]The link is somehow broken in #3, but chances are that Pavarang means [url]http://www.developer.nokia.com/Community/Discussion/showthread.php?178375-CTimer-problem[/url][/QUOTE]
Yes, thank you for the right link. Something went wrong in copy/paste from browser.