mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 11:16:47 +00:00
parent
f79998f626
commit
975f77a3bc
@ -164,10 +164,8 @@ impl Timekeeper {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn do_read_cpu_cycle_ns(&self) -> usize {
|
fn do_read_cpu_cycle_ns(&self) -> usize {
|
||||||
CurrentTimeArch::cycles2ns(
|
let prev = self.last_update_cpu_cycle.load(Ordering::SeqCst);
|
||||||
CurrentTimeArch::get_cycles()
|
CurrentTimeArch::cycles2ns(CurrentTimeArch::get_cycles().wrapping_sub(prev))
|
||||||
.wrapping_sub(self.last_update_cpu_cycle.load(Ordering::SeqCst)),
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mark_update_wall_time_ok(&self) {
|
fn mark_update_wall_time_ok(&self) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user