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)