> I've tested with this result on POSE:
That's the problem.  POSE is not speed limited, it runs as fast as the host
computer allows it to.  Try your code on a device and you'll see the timing
is more accurate.

----- Original Message ----- 
From: "Edmund" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 10:03 PM
Subject: Ticks per second = 356!!!!??


> Hi,
>
> I've tested with this result on POSE:
>
> SysTicksPerSecond() return 100
>
> BUT:
> {
> UInt32 startTime;
>  startTime = TimGetSeconds();
>  while (TimGetSeconds()==startTime){}  //wait until end of the current
> second
>  pref->ticksFor1sec = TimGetTicks();  //start of a second
>  startTime++;
>  while (TimGetSeconds()==startTime){}  //wait for a second
>  ticksFor1sec = TimGetTicks() - ticksFor1sec;
> }
>
> ticksFor1sec is 356!!!
>
> I use this value to test when user has pen down for 0.5 second:
>
> tickForHalfSec = ticksFor1sec / 2;         //somewhere to init
>
>   case penDownEvent:
>     // .........
>    penDownTick =TimGetTicks();
>    break;
>
>   case penUpEvent:
>     UInt32 curTick;
>     curTick = TimGetTicks();
>     if (curTick-penDownTick >= tickForHalfSec){
>             //do my stuff
>     }
>
> Running this shows the ticks per second is really 356, but not 100! But
it's
> not happened on PalmSim! Should i use SysTicksPerSecond anymore?
>
> Thanks
>
> Edmund
>
>
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to