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