mirror of
https://github.com/apache/nuttx.git
synced 2025-12-10 12:14:36 +08:00
In the current NuttX kernel implementation, there is no function
to represent pure scheduler ticks.
The existing clock_systime_ticks() cannot serve this purpose,
because it keeps increasing even when the scheduler is not running.
This happens since the returned value reflects real hardware time:
as long as the timer or alarm hardware is active,
clock_systime_ticks() will continuously increase.
This patch introduces two new functions that provide access to
scheduler ticks — a counter that only increases when the scheduler
itself is running.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com