1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

fix 32-bit kernel uptime error

error: mismatched types: expected `i64`, found `i32` (expected i64,
found i32)
This commit is contained in:
skv 2014-11-30 16:20:18 +03:00
parent c8188e56a4
commit 388f6e3cf8

View file

@ -174,7 +174,8 @@ fn get_uptime(boot_time: Option<time_t>) -> i64 {
_ => return match boot_time {
Some(t) => {
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
}