Sleeping less than a second in OCaml
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)
The Thread.delay function pauses the thread for the given number of seconds, but it takes a float, allowing you to pause the thread for less than a second.
from Unix module
val sleepf : float -> unit
Stop execution for the given number of seconds. Like sleep, but fractions of seconds are supported.