(ms: number)
| 332 | }); |
| 333 | |
| 334 | function blockIO(ms: number) { |
| 335 | const start = Date.now(); |
| 336 | while (Date.now() - start < ms); |
| 337 | } |
| 338 | |
| 339 | // Polls `get` until it returns a truthy value or the timeout elapses, instead |
| 340 | // of sleeping a fixed amount and hoping the (real-timer) fire already happened. |