...
The per-task scheduler lock time is saved in the task’s OS_TCB
during a context switch (see OSTaskSwHook()
in os_cpu_c.c
and described in Chapter 8, “Context Switching” Context Switching).
The unit of measure for the measured time is in CPU_TS
(timestamp) units so it is necessary to find the resolution of the timer used to measure the timestamps. For example, if the timer used for the timestamp is incremented at 1 MHz then the resolution of CPU_TS
is 1 microsecond.
...