1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Timing issues

Discussion in 'Questions (Windows Mobile)' started by leestevens, Aug 8, 2008.

  1. leestevens

    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.

  2. Erel

    Erel Administrator Staff Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice