problem with time calculation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michiel van der Blonk

    #1

    problem with time calculation

    It's probably something with rounding off, or floating point problems.
    I have a timer which is used when solving the Rubik's cube. It has to
    measure an exact time, but the clock display I made shows a different
    value than the actual time (also displayed after session: ...). I am
    using the same variable for both displays. sometimes it's off by .02.

    page: http://vanderblonk.com/cube/cubetimer.htm (just look at the
    source).

    thx for any help
    Michiel

  • Michiel van der Blonk

    #2
    Re: problem with time calculation

    On Feb 4, 9:07 pm, "Michiel van der Blonk" <blo...@gmail.c omwrote:
    It's probably something with rounding off, or floating point problems.
    I have a timer which is used when solving the Rubik's cube. It has to
    measure an exact time, but the clock display I made shows a different
    value than the actual time (also displayed after session: ...). I am
    using the same variable for both displays. sometimes it's off by .02.
    >
    page:http://vanderblonk.com/cube/cubetimer.htm(just look at the
    source).
    I already found out myself: when I set running=false the correct time
    is recorded, but then the timer continues with some lagged events and
    writes a different time on the clock. So the clock is wrong.

    Comment

    Working...