Skip to content

Commit 0ca09cb

Browse files
committed
1 parent 11ae525 commit 0ca09cb

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/uucore/src/lib/features/uptime.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,9 @@ mod tests {
521521
);
522522

523523
// Boot time should be before current time
524-
let now = Timestamp::now().as_second();
525-
assert!(
526-
(boot_time as i64) < now,
527-
"Boot time should be before current time"
528-
);
524+
let boot_time = Timestamp::from_second(boot_time).unwrap();
525+
let now = Timestamp::now();
526+
assert!(boot_time < now, "Boot time should be before current time");
529527
}
530528

531529
/// Test that get_uptime always succeeds on macOS due to sysctl fallback.

0 commit comments

Comments
 (0)