Login
Back to forumSee the full topicGo to last reply

Posted By

indi
on 2006-01-17
10:15:32
 Re: Yape

Its usually nothing to do with overflowing... its due to the fact that the "timer" differences can go negative... for example...Heres a few "ticks", the CPU you might run on, and the counter values you might get back...


Tick CPU Counter returned
--------------------------------------------
1 CPU 0 50
2 CPU 0 100
3 CPU 0 150
4 CPU 0 200
5 CPU 1 50
6 CPU 0 300
7 CPU 0 350
8 CPU 0 400
9 CPU 1 490
10 CPU 0 500


and so on... The problem is "normal" timing code doesn't take negative or very large values into account. And even if you do, you have no way of knowing how much time has "actually" passed.

Lets say you get counters 100,150,50....

Now, you can "guess" that you've swapped CPU, but that doesn't tell you how much time has elapsed since the last "tick" so you have to "flip" now. But that might be either to fast, or to slow and this is what results in the "judder" or even "freeze" - particually on negative values.

Also, time frequancy may change too... so you have to get that everynow and then to make sure you've delt with power management.

----------------------------------------------------
Yape reports this.....

High resolution timer frequency: -2083577296
Current monitor refresh rate: 60 Hz



Back to top


Copyright © Plus/4 World Team, 2001-2024