Stop using "Int" for microsecond delays in "base"

Neil Mitchell ndmitchell at gmail.com
Wed Apr 20 22:31:39 CEST 2011


> I always end up with a wrapper around it, taking a NominalDiffTime; I could
> never be sure whether threadDelay interpreted its argument as
> milli-/micro-/nano-seconds without looking it up.

I too always end up with a wrapper, but my wrapper takes a Double,
which is in seconds. Seconds are easy, and a Double means that you can
specify ridiculously long intervals, and for short intervals you have
high precision. I find it much easier to write sleep 5, when I want to
sleep for 5 seconds, than putting in some multiplication factor.

Thanks, Neil



More information about the Libraries mailing list