]> git.vpit.fr Git - perl/modules/VPIT-TestHelpers.git/commitdiff
Correct return value for the sleep() fallback implementation
authorVincent Pit <vince@profvince.com>
Mon, 20 Apr 2015 14:10:24 +0000 (11:10 -0300)
committerVincent Pit <vince@profvince.com>
Mon, 20 Apr 2015 14:10:24 +0000 (11:10 -0300)
lib/VPIT/TestHelpers.pm

index 27c814907a08f247b9d5b8c3f0be2c5281922f45..65fc2569ba1c2a70776d4cd99d11bb3327bd1f13 100644 (file)
@@ -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;
    };
   },
  );