We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca8ef80 commit 5656d67Copy full SHA for 5656d67
1 file changed
embedded-hal/src/delay.rs
@@ -16,7 +16,7 @@ pub trait DelayNs {
16
fn delay_us(&mut self, mut us: u32) {
17
const MAX_MICROS: u32 = u32::MAX / NANOS_PER_MICRO;
18
19
- // Avoid potential overflow if micro -> micro conversion is too large
+ // Avoid potential overflow if micro -> nano conversion is too large
20
while us > MAX_MICROS {
21
us -= MAX_MICROS;
22
self.delay_ns(MAX_MICROS * NANOS_PER_MICRO);
@@ -31,7 +31,7 @@ pub trait DelayNs {
31
fn delay_ms(&mut self, mut ms: u32) {
32
const MAX_MILLIS: u32 = u32::MAX / NANOS_PER_MILLI;
33
34
- // Avoid potential overflow if milli -> micro conversion is too large
+ // Avoid potential overflow if milli -> nano conversion is too large
35
while ms > MAX_MILLIS {
36
ms -= MAX_MILLIS;
37
self.delay_ns(MAX_MILLIS * NANOS_PER_MILLI);
0 commit comments