From: Vincent Pit Date: Mon, 20 Apr 2015 14:24:01 +0000 (-0300) Subject: Add prototypes to fallback usleep() implementations X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=7f0ff09635ac5356801d548bb603970e45d53511;p=perl%2Fmodules%2FVPIT-TestHelpers.git Add prototypes to fallback usleep() implementations --- diff --git a/lib/VPIT/TestHelpers.pm b/lib/VPIT/TestHelpers.pm index f45da91..bdc3a4c 100644 --- a/lib/VPIT/TestHelpers.pm +++ b/lib/VPIT/TestHelpers.pm @@ -721,7 +721,7 @@ sub init_usleep { 'select' => sub { if ($Config::Config{d_select}) { diag 'Using select()-based fallback usleep()'; - return sub { + return sub ($) { my $s = $_[0]; my $r = 0; while ($s > 0) { @@ -739,7 +739,7 @@ sub init_usleep { }, 'sleep' => sub { diag 'Using sleep()-based fallback usleep()'; - return sub { + return sub ($) { my $s = int($_[0] / 1e6); my $t = sleep $s; return $t * 1e6;