> I did a full recompilation of the software.
> I have rebuilt on 10.2 and it seems to work fine on that, so it must be
> something that was introduced in 10.3
> It all starts up working properly, and if i am actively using the
> computer it is fine, but when I leave the programme running the clock
> seems to slow down after 5-10 minutes
Sounds like cpu frequency scaling is contributing. As long as you’re using
the system, the cpu clock is kept high, when you leave it idle, the system
saves energy by shifting the cpu to a lower, slower clock speed. If your
program calibrates itself against the ‘high speed’ clock, it will be slow
when running during the ‘slow clock’ periods.
If you’re running a function every microsecond, goodness! 1,000,000 times
a second? With system overhead and non-optimal interrupt routines, I would
imagine that it gets skipped occasionally while in slow-clock.
Just wondering… what on earth needs to be run each micro second? Wow.
Consider: 2Ghz machine, 2,000,000,000 (approx) clock ticks a second. If
you’re running something 1,000,000 times a second, it (theoretically) only
gets 2,000 ticks to get anything done before it gets called again. Many
instructions take 2 or more clock ticks to perform… so you’ve got LESS
than 1,000 instructions (probably more like 500-600 really) you can execute
before your interrupt is called again.
And that’s only considering the cpu running your function alone. Not
counting the overhead involved with watching the keyboard for your inputs,
displaying things on the screen, handling network packets, etc.
L R Nix