Without the -q (--quiet) option, the program outputs the thread
stats every 100ms, which is compatible with the original
rt-tests/cyclictest utility.
Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
Despite the existence of the patch in benchmarks/rt-tests,
this commit adds the NuttX Official cyclictest utility.
The main difference is the introduction of different
waiting methods next to POSIX clock_nanosleep:
- The thread can wait for a g_waitsem, posted by board_timerhook()
if CONFIG_SYSTEMTICK_HOOK is defined.
Since the semaphore is only one, only one thread can wait.
- The thread can wait for a Timer Device to timeout.
The timer's timeout determines the waiting time of the thread.
Since the timer is only one, again, only one thread can wait.
The user can measure the elapsed time using clock_gettime
or the timer device itself. The different waiting and measuring
methods were introduced because NuttX, by default, does not
offer fine measuring capabilities using POSIX time functions
(as of Feb 25).
Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>