Skip to content

Commit d369a28

Browse files
authored
Update timer.rs
1 parent 4dcaa9a commit d369a28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

os/src/timer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub fn get_time_ms() -> usize {
2626
/// get current time in microseconds
2727
#[allow(dead_code)]
2828
pub fn get_time_us() -> usize {
29-
time::read() / (CLOCK_FREQ / MICRO_PER_SEC)
29+
time::read() * MICRO_PER_SEC / CLOCK_FREQ
3030
}
3131

3232
/// Set the next timer interrupt

0 commit comments

Comments
 (0)