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