Skip to content

Commit

Permalink
Use nqp::sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
perlpilot committed Jun 1, 2012
1 parent d3c3756 commit 930a1a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/control.pm
Expand Up @@ -191,9 +191,9 @@ my $NaN = nqp::p6box_n(pir::set__Ns('NaN'));
sub sleep($seconds = $Inf) { # fractional seconds also allowed
my $time1 = time;
if $seconds ~~ $Inf {
pir::sleep__vN(1e16) while True;
nqp::sleep(1e16) while True;
} else {
pir::sleep__vN($seconds.Num);
nqp::sleep($seconds.Num);
}
my $time2 = time;
return $time2 - $time1;
Expand Down

0 comments on commit 930a1a5

Please sign in to comment.