Re:Please put units in names
by renewiltord on Monday March 21, 2022 @12:40PM
(#30756247)
Ah no. The function accepts a `Duration` type which could be precisely 1 m 23 s 14 ms 10 us 8 ns. And so you don't need `delay_ms` vs. `delay_ns` or anything because the type encodes the precise duration. If you passed a nanosecond `Duration` into `delay` it will delay ns, if you pass a millisecond `Duration` it will delay ms.
[ Parent
| on HN ]
There are no comments on this comment yet.