Problem in use RTimer
Login to reply to this topic.
Tue, 2008-07-08 14:54
Joined: 2006-06-07
Forum posts: 18

I used RTimer with CActive and I want to use setactive event in special time then I used this code iRTimer.At(TTime) ;
The diffrence between HomeTime and special time is 1 hour
but before that time event occure the code come in below :

void CMyTimer::Set ( TTime time )
{
Cancel() ;
iTimer.At ( iStatus , time ) ;
SetActive() ;
}

{
TTime t;
t.HomeTime() ;
TTimeIntervalMinutes interval(60);
t+=interval;
Set(t) ;
}

I understand that iTimer.At work carefully when diffrence between HomeTime and special time is maximum 30 minute
Why?


Tue, 2008-07-08 15:03
Joined: 2006-11-14
Forum posts: 105

Hi,

I think you need to handle the cases in RunL such as

case KErrNone :
                               
                break;
                case KErrCancel  :
                       
                break;
                case KErrAbort  :
                       
                break;
                case KErrUnderflow  :
                       
                break;
                case KErrOverFlow  :
                break;

Hope this will help you.....

Regards,
Yogesh

Tue, 2008-07-08 15:11
Joined: 2006-06-07
Forum posts: 18

Hi friend
I test this code, but in requested time RunL method dont active . before this time active RunL with -39 status

Tue, 2008-07-08 15:52
Joined: 2006-11-14
Forum posts: 105

Hi,

-39 means KErrAbort
In this context the meaning of KErrAbort
is :
the timer was aborted because the system time changed;

Regards,
Yogesh

Wed, 2008-07-09 10:42
Joined: 2006-06-07
Forum posts: 18

Hi,
Is there restriction in use TTime varable at RTimer.At()?


copyright 2003-2009 NewLC SARL