mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 05:27:45 +00:00
Merge pull request #461 from skv-headless/uptime_mismatch
fix 32-bit kernel uptime error
This commit is contained in:
commit
f07fedfcf9
1 changed files with 2 additions and 1 deletions
|
@ -174,7 +174,8 @@ fn get_uptime(boot_time: Option<time_t>) -> i64 {
|
||||||
_ => return match boot_time {
|
_ => return match boot_time {
|
||||||
Some(t) => {
|
Some(t) => {
|
||||||
let now = rtime::get_time().sec;
|
let now = rtime::get_time().sec;
|
||||||
((now - t) * 100) as i64 // Return in ms
|
let time = t.to_i64().unwrap();
|
||||||
|
((now - time) * 100) as i64 // Return in ms
|
||||||
},
|
},
|
||||||
_ => -1
|
_ => -1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue