Timing issues

leestevens

New Member
Licensed User
I have a project which requires a timer (like a stopwatch).

I have coded this using a timer control and the elapsed time is put into a label to view on screen.

I calculate the elapsed time by subtracting the number of ticks returned by the NOW function at the start of the routine from the value returned by the NOW function at each timer interval. All works fine and accurate enough for my purposes, except...

On the desktop it works as I would like, formatted to 2 decimal places and tenths and hundreths of seconds are shown e.g. 2.63secs. On my device the exact same code will produce only round seconds e.g. 2.00 secs., 3.00 secs.

Does anyone have any ideas why this would be, is it a device limitation? I am using an Orbit XDA device which runs at 201MHz and a desktop which runs at 2.8GHz?

Is there a better way to create 'timing' routines.

Thanks
Lee
 
Top