OpenImageIO/oiio — pull request #723 by lgritz (2013-10-28 04:16:19+00:00)
Title: Allow more slop in the timer_test (tolerance of 1/100s instead of 1/1000s)

For some reason, this test fails on OS 10.9 Mavericks, seemingly because
there's a bit more slop in how long a usleep() really takes to wake you
up again. It used to be within 1/1000s, but sometimes it's a bit more
on this OS. Changing the tolerance to 1/100s makes the tests pass, and
I don't see any problem with it.

I've read that one of Mavericks' major design goals was to improve
memory efficiency, and apparently the process scheduler tries very hard
to juggle time slices around to make slices abut (to amortize the power
efficiency of the Intel chips, which have to ramp up and down a bit when
there's processor activity). It wouldn't surprise me if this ends up
making usleep just a bit less consistent in precisely how long it will
be before the process wakes up again. How's that for a hypothesis?