[uptime] new feature to track OT instance uptime (in msec) (#6968)

This commit adds a new module `Uptime` which tracks the number of
milliseconds since OpenThread stack initialization as an `uint64_t`
value. It also adds public OT APIs to get the current uptime value
(either as the number of milliseconds or in human-readable string
format like "2 days 12:45:12.762"). A CLI `uptime` command is also
added. This feature can be enabled using the newly added config
option `OPENTHREAD_CONFIG_UPTIME_ENABLE` (or the related CMake
`OT_UPTIME` option).
This commit is contained in:
Abtin Keshavarzian
2021-09-02 13:44:40 -07:00
committed by Jonathan Hui
parent 0f73466897
commit ca3830fac2
25 changed files with 432 additions and 1 deletions
+1
View File
@@ -122,6 +122,7 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
'-DOT_COVERAGE=ON'
'-DOT_LOG_LEVEL_DYNAMIC=ON'
'-DOT_COMPILE_WARNING_AS_ERROR=ON'
'-DOT_UPTIME=ON'
)
readonly OT_CLANG_TIDY_CHECKS="\