I want to check a web site statue every 5 second in a GUI base program. I need a timer and I think RTimer is the best for this purpose. I did below code (this is simplified code) from the sdk examples for an exe program. My problems are as follow:
1-When I use User::WaitForAnyRequest(); it doesn’t work and exit with panic code (stray section of code).
2- When I use User::WaitForRequest(heartbeatStatus); It seems to work but I can’t get user events.
3- What is the correct procedure for this mention?
void CPlaceLoggerAppContainer::sleep(TInt aTenths)
// sleep for an interval measured in tenths of a second
User::After(aTenths * 10000); // just let the User function do it for us
// create and initialize heartbeat timer
TInt heartbeatTick = 0;
// find out which request completed, and handle it
if (heartbeatStatus != KRequestPending)
// heartbeat completed so service request
// take some time over it
// test whether processing should finish
if (heartbeatTick >= 10)
// 10 heart-beats: processing finished
// finish wait loop
// stray signal
User::Panic(KMsgStraySignal, 1); // panic!