From: Vincent Pit Date: Mon, 20 Apr 2015 14:10:24 +0000 (-0300) Subject: Correct return value for the sleep() fallback implementation X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=cd89e4206b75ac471deac8c71e2655ab19c8ff75;p=perl%2Fmodules%2FVPIT-TestHelpers.git Correct return value for the sleep() fallback implementation --- diff --git a/lib/VPIT/TestHelpers.pm b/lib/VPIT/TestHelpers.pm index 27c8149..65fc256 100644 --- a/lib/VPIT/TestHelpers.pm +++ b/lib/VPIT/TestHelpers.pm @@ -722,7 +722,8 @@ sub init_usleep { diag 'Using sleep()-based fallback usleep()'; return sub { my $s = int($_[0] / 1e6); - sleep $s if $s; + my $t = sleep $s; + return $t * 1e6; }; }, );