[Ktechlab-devel] the timer cuestion

santiago gonzalez santigoro at gmail.com
Fri Oct 2 19:03:15 UTC 2009


Going on with the timer stuff.
I had been playing with the ktl qtimer and i see that qtimer does not call
simulator step every 1ms... indeed it does every aprox. 4ms, and not very
accurate or regular; that's why i have a 4s period for a 1Hz ecclock-input.

The only way i found to have regular and accurate periods is sarting qtimer
at 10ms and setting maxSteps according to this:

simulator.cpp __________________________________________________

stepTimer->start(10);

const unsigned maxSteps = unsigned(LINEAR_UPDATE_RATE / 100);
______________________________________________________________

This way i have clock input and pic running at real time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20091002/8c79b21d/attachment.html>


More information about the Ktechlab-devel mailing list