Milliseconds, Microseconds, Tomato, Tomahto

| | Comments (0)
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.

Now Playing: Tears In Heaven - Eric Clapton (Unplugged)

use.perl.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on October 29, 2002 5:29 AM.

RSS Validator was the previous entry in this site.

Satan is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.