This article describes time measurement for executed code: https://docs.zephyrproject.org/latest/kernel/timing_functions/index.html