Blocking delay until WAIT time since mark() has passed
| 33 | |
| 34 | /// Blocking delay until WAIT time since mark() has passed |
| 35 | void wait() { |
| 36 | fl::u16 diff; |
| 37 | do { |
| 38 | diff = (fl::micros() & 0xFFFF) - mLastMicros; |
| 39 | } while(diff < WAIT); |
| 40 | } |
| 41 | |
| 42 | /// Reset the timestamp that marks the start of the wait period |
| 43 | void mark() { mLastMicros = fl::micros() & 0xFFFF; } |