Skip to content

Commit

Permalink
Update timer.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
田凯夫 committed Mar 5, 2024
1 parent ddfa271 commit 4805957
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn get_time() -> usize {
/// get current time in milliseconds
#[allow(dead_code)]
pub fn get_time_ms() -> usize {
time::read() / (CLOCK_FREQ / MSEC_PER_SEC)
time::read() * MSEC_PER_SEC / CLOCK_FREQ
}

/// get current time in microseconds
Expand Down

0 comments on commit 4805957

Please sign in to comment.