Hello!

Maybe QDeadlineTimer and QElapsedTimer covers your needs?

https://doc.qt.io/qt-5/qdeadlinetimer.html
https://doc.qt.io/qt-5/qelapsedtimer.html

Mårten

________________________________________
From: Development <[email protected]> on behalf of David 
Jackson <[email protected]>
Sent: Monday, November 2, 2020 15:15
To: [email protected]
Subject: [Development] Nanosecond accuracy timer

The Qt API needs a QTimer with nanosecond accuracy. I know what is actually 
provided by underlying platforms varies greatly. But instead of Qt introducing 
its own limitation, Qt needs to provide a way for what the underlying platform 
can support to be accessed. If a platform does not support nanosecond accuracy, 
it can simply be rounded to the accuracy that the platform supports. select() 
on Linux and other OSs supports nanosecond interval, so a nanosecond interval 
can simply be passed straight through to select on those platforms. I know it 
is no guarantee that it is actually nanosecond accuracy, and probably not, but 
just expose the nanosecond interface that the OS supports and let the developer 
determine their own strategy and needs.
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to