Milliseconds, Microseconds, Tomato, Tomahto
ualarm() in GUSI (the POSIX library we use for MacPerl) accepts microsecond intervals, as one expects, but converts positive intervals into milliseconds, and negative intervals into positive microseconds (well, ualarm() doesn't do it, but the Restart() method it calls does).
Apparently, this is an old Macintosh Time Manager convention, so you can specify in either milliseconds or microseconds. So ualarm() is going to be fixed, but it caused for some odd behavior in the meantime: Time::HiRes::alarm(1, .5) would not alarm in one second and then for every .5 seconds following, it would alarm 1 second and then for every 500 seconds after. Oops! No wonder the ualarm(10_000, 10_000) call in HiRes.t took so long to complete.
Apparently, this is an old Macintosh Time Manager convention, so you can specify in either milliseconds or microseconds. So ualarm() is going to be fixed, but it caused for some odd behavior in the meantime: Time::HiRes::alarm(1, .5) would not alarm in one second and then for every .5 seconds following, it would alarm 1 second and then for every 500 seconds after. Oops! No wonder the ualarm(10_000, 10_000) call in HiRes.t took so long to complete.
Now Playing: Tears In Heaven - Eric Clapton (Unplugged)
Leave a comment