Open
Description
uucore's get_uptime
function:
- Returns a signed integer value (but the uptime can't be a negative value?)
- Ignores fractional parts of a second even though the Linux kernel provides that in
/proc/uptime
.
Possibly depending on the fractional timestamp value at boot time, the second point can cause a 1 second offset between GNU coreutils and uutils:
$ uptime --since
2025-04-23 18:26:36
$ cargo run -p uu_uptime -- --since
2025-04-23 18:26:37
I believe we should change the function signature to return a Duration.
Not sure how much we care about semver in uucore
, we would need to modify procps
/uu_top
as well: see #7289.