By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,603 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,603 IT Pros & Developers. It's quick & easy.

problem with time calculation

P: n/a
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

Feb 5 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
On Feb 4, 9:07 pm, "Michiel van der Blonk" <blo...@gmail.comwrote:
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.

Feb 6 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.