Convert POSIX::sleep to an XS wrapper for PerlProc_sleep().
authorNicholas Clark <nick@ccl4.org>
Thu, 8 Dec 2011 15:46:21 +0000 (16:46 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 30 Dec 2011 10:36:39 +0000 (11:36 +0100)
commita387c53a5a2f3e13850addc6976624f827a26226
tree9f5aed62be62f37269e9e83bd92bae669aa767e1
parent937a45d0cc6e5b194e9242faa9cf78ba2122e6a3
Convert POSIX::sleep to an XS wrapper for PerlProc_sleep().

Previously it was a Perl wrapper for CORE::sleep, converting CORE::sleep's
return value of elapsed time slept into the POSIX return value of seconds
remaining. However, that approach could sometimes return a negative result
if CORE::sleep had slept for more than a second longer than the requested
time.
ext/B/t/concise-xs.t
ext/POSIX/POSIX.xs
ext/POSIX/lib/POSIX.pm