Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
agowatch committed Nov 30, 2023
1 parent 67dfbdc commit a4184cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions riscv/src/delay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ impl McycleDelay {

impl DelayNs for McycleDelay {
#[inline]
fn delay_ns(&mut self, ns: u32) {
fn delay_ns(&mut self, ns: u32) {
let t0 = mcycle::read64();
let ns_64: u64 = ns.into();
let clock = (ns_64 * (self.ticks_second as u64)) / 1_000_000_000u64;
while mcycle::read64().wrapping_sub(t0) <= clock {}
}
}
}

0 comments on commit a4184cf

Please sign in to comment.