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:
parent
c8188e56a4
commit
388f6e3cf8
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 {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue