The Unix.sleep
function can suspend the program for whole seconds, but how can you suspend it for less than a second?
The classical Unix solution for this is to use select() with no file descriptors:
let minisleep (sec: float) =
ignore (Unix.select [] [] [] sec)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With