1.. _module-pw_chrono_threadx: 2 3----------------- 4pw_chrono_threadx 5----------------- 6``pw_chrono_threadx`` is a collection of ``pw_chrono`` backends that are 7implemented using ThreadX. 8 9.. warning:: 10 This module is under construction, not ready for use, and the documentation 11 is incomplete. 12 13SystemClock backend 14------------------- 15The ThreadX based ``system_clock`` backend implements the 16``pw_chrono:system_clock`` facade by using ``tx_time_get()``. An 17InterruptSpinLock is used to manage overflows in a thread and interrupt safe 18manner to produce a signed 64 bit timestamp. 19 20The ``SystemClock::now()`` must be used more than once per overflow of the 21native ThreadX ``tx_time_get()`` overflow. Note that this duration may vary if 22``tx_time_set()`` is used. 23 24.. warning:: 25 Note that this is not compatible with TX_NO_TIMER as this disables 26 ``tx_time_get()``. 27 28Build targets 29------------- 30The GN build for ``pw_chrono_threadx`` has one target: ``system_clock``. 31The ``system_clock`` target provides the 32``pw_chrono_backend/system_clock_config.h`` and ``pw_chrono_threadx/config.h`` 33headers and the backend for the ``pw_chrono:system_clock``. 34