feat: add an option to use native timer functions (#672)
This allows to control the behavior of mocked timers (@sinonjs/fake-timers),
depending on the value of the "useNativeTimers" option:
- true: use native setTimeout function
- false (default): use classic timers, that may be mocked
The "installTimerFunctions" method will also be used in the
`socket.io-client` package:
```
import { installTimerFunctions } from "engine.io-client/lib/util";
```
Note: we could also have put the method in its own library, but that
sounded a bit overkill
Related: https://github.com/socketio/socket.io-client/pull/1479 M
Michael Vartan committed
5d1d5bea11ab6854473ddc02a3391929ea4fc8f4
Parent: 08db7f6
Committed by Damien Arrachequesne <damien.arrachequesne@gmail.com>
on 7/30/2021, 7:11:49 AM