Hi All
i want to know how to use RTimer's At to wait in seoconds,
is Inactivity helpful in this regard?
Thanks & Regards
Ashok
Hi All
i want to know how to use RTimer's At to wait in seoconds,
is Inactivity helpful in this regard?
Thanks & Regards
Ashok
It is always advisable checking the documentation of "system" classes in the SDK Help...
RTimer::At will notify you at a given time. It expects you to provide the given time in TTime, so also check that one: you will find that you can get current time with TTime::HomeTime, and add a second with TTime:perator+=(TTimeIntervalSeconds aSecond)
However if you have already checked RTimer, you will find RTimer::After, which notifies you after a specified time interval. It makes more sense to use this one for your case I think. Note that you have to specify time in microseconds.
with RTimer:
TTimeIntervalMicroSeconds32 timeIntervalMs(60000000);
RTimer timer;
TRequestStatus timerStatus;
timer.CreateLocal();
timer.After(timerStatus,timeIntervalMs);
User::WaitForRequest(timerStatus);
///
wait without RTimer
TTimeIntervalMicroSeconds32 aInterval = 4000000;
User::After(aInterval);
Regards
Kamal :)
------------------
You never expect what expects you.
Thank you wizard_hu_.It is working.
To Use After ,It takes TTimeIntervalMicroSeconds whose max range is +-35 minutes, 47 seconds
But i am looking for more so i need to give Seconds as Input so At() is working.
Thankyou again.
Ashok
Try the At() instead of After() then..
Note, that timers get aborted regularry on devices.
Most probably, because they update system time from network.
I suggest you make an active object that handles KErrAborted (i.e. restarts timer, if needed)
Otherwise, your code will wait less than you intended.