Weird timing issue with Thread.sleep

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Aug 4 08:24:50 PDT 2011


On 8/4/11, Jacob Carlborg <doob at me.com> wrote:
> I would say that the correct solution is to rewrite the examples to work
> with any CPU speed.
>
> --
> /Jacob Carlborg
>

That's what I did. The framerate isn't clamped, and the threads don't
sleep, there's no spinning going on, I've replaced all of that with
timers. The old code used spinning in some examples, which of course
maxes out an entire core. That's not how things should be done these
days. :)


More information about the Digitalmars-d-learn mailing list