Skip to content

Commit f3eb367

Browse files
committed
make sure that BOOT_TIME is initialized
1 parent ac5e5ec commit f3eb367

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/arch/aarch64/kernel/systemtime.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ pub fn init() {
5454
let current_ticks = super::processor::get_timer_ticks();
5555
BOOT_TIME.set(micros - current_ticks).unwrap();
5656
info!("Hermit booted on {boot_time}");
57+
58+
return;
5759
}
5860
_ => {
5961
let dtb = unsafe {
@@ -109,6 +111,8 @@ pub fn init() {
109111
}
110112
}
111113
};
114+
115+
BOOT_TIME.set(0).unwrap();
112116
}
113117

114118
/// Returns the current time in microseconds since UNIX epoch.

0 commit comments

Comments
 (0)