Timer Precision

23 views
Skip to first unread message

dev....@gmail.com

unread,
Nov 29, 2018, 11:25:44 AM11/29/18
to pyqtgraph
Hi All,
I am new to pyqtgraph and was curious about the precision of the qtimer. How accurate is it and Can it do microseconds?
Regards,
Dev

Patrick

unread,
Nov 29, 2018, 10:01:59 PM11/29/18
to pyqtgraph
Hi,

Clocks are system (hardware, OS) dependent. Documentation (http://doc.qt.io/qt-5/qtimer.html) says 1 ms can be expected. You may want to keep track of events using a separate clock (rather than relying on a QTimer timeout event). The python time module should help there (https://docs.python.org/3/library/time.html), where you can query the accuracy of the system clock(s), and access the perf_counter() to get the most accurate system clock available.

Patrick
Reply all
Reply to author
Forward
0 new messages