
20 Apr
2011
20 Apr
'11
4:31 p.m.
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