Implementing a Timer
| Mon, 2008-02-25 10:29 | |
|
Hi, I want to implement a timer in my program having two view. Which timer class to be used and how to be used for it. regards, |
|
| Mon, 2008-02-25 10:29 | |
|
Hi, I want to implement a timer in my program having two view. Which timer class to be used and how to be used for it. regards, |
|
Forum posts: 54
you can use any of the timer class which is available in sdk, for the usage of the class just search in this forum definitely you will get the help
Regards
Praveen
Forum posts: 72
Thanks Praveen.
I have tried to search this forum and FN also and did not find a good explanation to start with.I got rather confused.
Will u pls, take the pain to explain the thing a breif or points to a source that can guide me to use the timer properly.
A small code example kind of thing will be betterr.
Thanks again..
Forum posts: 49
You can use RTimer or CTimer.
Forum posts: 54
just impement your timer like this
CCustomTimer:CTimer
CCustomTimer::CCustomTimer()
:CTimer(EPriorityLow)
{
After (Val);//making the Interrupt
}
CCustomTimer::RunL()
{
//Call Back Function
//write the Code For changinig the views
After(val);
}
cCustomTimer::After(TTimeIntervalMicroSeconds32 aInterval)
{
CTimer::After(aInterval);
}
CCustomTimer::Cancel()
{
Cancel();
}
i think this will help you
Regards
Praveen
Forum posts: 159
What additional functionality does CCustomTimer introduce to CTimer apart from the infinite recursive loop in Cancel()?
Forum posts: 49
praveenvlm wrote wrong code, it should look like this
class CCustomTimer: public CTimer {
...
};
CCustomTimer::CCustomTimer()
:CTimer(EPriorityLow)
{
CActiveScheduler::add( this );
}
CCustomTimer::RunL()
{
//Call Back Function
//write the Code For changinig the views
}
CCustomTimer::SwitchViewAfter(TTimeIntervalMicroSeconds32 aInterval)
{
CTimer::After( aInterval );
}
Forum posts: 54
Thanks Iman
the code what you have written is correct
by mistake i written the above code
Thanks & Regadrs
Praveen