mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
f8af79817b
This commit enhances the `UptimeToString()` function by introducing `UptimeStringFlags` to allow customization of the output string. Specifically, it adds the following flags: - `kUptimeStringIncludeMsec`: Includes milliseconds in the string. - `kUptimeStringSkipHoursIfZero`: Omits the `<hh>:` part when hours and days are zero. The commit also adds a new `UptimeToString()` overload that returns an `UptimeString` (a `String` object), simplifying usage in logging and other areas. All existing call sites are updated to use the new flags and the new overload where appropriate.