I still don't understand the timer cuestion, qtimer is suposed to call
simulator::step() every 1 ms and then a number of calculated steps are
"looped" to reach the non-linear rate (1e4) and logic rate (1e6).

But when i drag&drop an ecclock-input to the circuit it should go at 1 Hz,
but i goes at 0.25 Hz.. it takes 4S for a complete cicle... in diferent PCs
i have diferents timings.. not big diferences.. may be +- 10%.... but 4S for
an 1 Hz ecclock-input is a very big error.

I had a look to qtimer at trolltech docs and it doesn't look a very accurate
thing:
"Note that QTimer's accuracy depends on the underlying operating system and
hardware. Most platforms support an accuracy of 20ms; some provide more..."

...An accuracy of 20ms !!!!!!

http://doc.trolltech.com/3.3/qtimer.html

I think something should be done to improve this.
I have no idea, but looks like C++ doesn't have high-resolution timers...
but what about some POSIX functions?, for example gethrtime() looks
interesting: it gives the nunber of nanosecods since last boot:

http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=332

With a granularity of nanoseconds is possible to do something accurate.

Is possible there are some posix interfaces in some C or C++ library... i
have no idea, but perhaps there are some better solution than using qtimer.

Just a thought...
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Ktechlab-devel mailing list
Ktechlab-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ktechlab-devel

Reply via email to