Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Using RTimer class


Using Lock()

The following code fragment shows usage of the Lock() function.

...
TRequestStatus stat;
TTimerLockSpec lockspec;
RTimer timer;
...
timer.Lock(lockspec,stat)
...

We can ask for a timer event to occur at a particular twelfth in the next second.

The current time is A seconds + B milliseconds, then

Lock(EThreeOclock, stat);

will complete at C seconds + 3/12 milliseconds, where C=A, if B<3/12milliseconds or C=A+1.