[Development] Nanosecond accuracy timer

David Jackson djackson452 at gmail.com
Mon Nov 2 15:15:57 CET 2020


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20201102/6a2a1b17/attachment.html>


More information about the Development mailing list