[routing-manager] track router age (#10453)

This commit adds a new mechanism in `RoutingManager` to track the
duration since a router is first discovered. This information is now
provided in `otBorderRoutingRouterEntry`, and the CLI `br routers`
command is updated to include this information for each router.

To enable tracking of longer durations, `Uptime` is used, which tracks
milliseconds since the start of `ot::Instance` as a `uint64_t` value.
`TimerMilli::GetNow()` is not suitable for this purpose because it
utilizes `uint32_t` intervals, which would limit the maximum
trackable time to roughly 49 days due to potential overflow.
This commit is contained in:
Abtin Keshavarzian
2024-07-09 09:57:57 -07:00
committed by GitHub
parent 821f2415e0
commit 8d4119c914
7 changed files with 44 additions and 13 deletions

View File

@ -80,6 +80,7 @@ OT_BUILD_OPTIONS=(
"-DOT_SRP_ADV_PROXY=ON"
"-DOT_SRP_CLIENT=ON"
"-DOT_SRP_SERVER=ON"
"-DOT_UPTIME=ON"
"-DOT_VENDOR_NAME=OpenThread"
"-DOT_VENDOR_MODEL=Scan-build"
"-DOT_VENDOR_SW_VERSION=OT"