Skip to content

Commit 2cc3732

Browse files
author
田凯夫
committed
Update timer.rs
1 parent d369a28 commit 2cc3732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

os/src/timer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn get_time() -> usize {
2020
/// get current time in milliseconds
2121
#[allow(dead_code)]
2222
pub fn get_time_ms() -> usize {
23-
time::read() / (CLOCK_FREQ / MSEC_PER_SEC)
23+
time::read() * MSEC_PER_SEC / CLOCK_FREQ
2424
}
2525

2626
/// get current time in microseconds

0 commit comments

Comments
 (0)