diff options
author | Abhijit Menon-Sen <ams@wiw.org> | 2001-07-19 10:00:43 +0530 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-07-19 06:28:08 +0000 |
commit | f9d00e575aebafe3654e695fbdbbf992a84f7b30 (patch) | |
tree | 5176024c4f607de0b851e461002afafba617da64 /ext | |
parent | 2fb9ab56c575e2a910e23a92a6a02d3d7fd09fbb (diff) | |
download | perl-f9d00e575aebafe3654e695fbdbbf992a84f7b30.tar.gz |
Re: Time::HiRes qw(sleep) fails
Message-Id: <20010719043043.A10327@lustre.dyn.wiw.org>
p4raw-id: //depot/perl@11409
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Time/HiRes/HiRes.xs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/Time/HiRes/HiRes.xs b/ext/Time/HiRes/HiRes.xs index a16dccc3b4..77ce9e28be 100644 --- a/ext/Time/HiRes/HiRes.xs +++ b/ext/Time/HiRes/HiRes.xs @@ -276,11 +276,12 @@ usleep(useconds) int useconds void -sleep(fseconds) - NV fseconds +sleep(...) CODE: - int useconds = fseconds * 1000000; - usleep (useconds); + if (items > 0) + usleep((int)(SvNV(ST(0)) * 1000000)); + else + PerlProc_pause(); #endif |