problem with time calculation

  • Thread starter Michiel van der Blonk
  • Start date
M

Michiel van der Blonk

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
 
M

Michiel van der Blonk

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top