Skip to content

Commit

Permalink
pir::time__N to nqp::time_n
Browse files Browse the repository at this point in the history
  • Loading branch information
kboga committed May 30, 2012
1 parent 5f0abdf commit 881c8d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/fib.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ sub fib($n) {

my $N := 29;

my $t0 := pir::time__N();
my $t0 := nqp::time_n();
my $z := fib($N);
my $t1 := pir::time__N();
my $t1 := nqp::time_n();

pir::say("fib($N) = " ~ fib($N));
pir::say("time = " ~ ($t1-$t0));
4 changes: 2 additions & 2 deletions src/HLL/Compiler.pm
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ class HLL::Compiler {
my $result := $source;
my $stderr := pir::getinterp().stderr_handle;
for self.stages() {
my $timestamp := pir::time__N();
my $timestamp := nqp::time_n();
$result := self."$_"($result, |%adverbs);
my $diff := pir::time__N() - $timestamp;
my $diff := nqp::time_n() - $timestamp;
if %adverbs<stagestats> {
my $difffmt := pir::sprintf__SsP("%.3f", [$diff]);
$stderr.print("Stage $_: $difffmt\n");
Expand Down
2 changes: 1 addition & 1 deletion src/NQP/Grammar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ grammar NQP::Grammar is HLL::Grammar {
my $source_id := nqp::sha1(nqp::istype(self, NQPCursor) ??
nqp::getattr_s(self, NQPCursor, '$!target') !!
nqp::getattr(self, Regex::Cursor, '$!target')) ~
'-' ~ ~pir::time__N();
'-' ~ ~nqp::time_n();
my $*W := nqp::isnull($file) ??
NQP::World.new(:handle($source_id)) !!
NQP::World.new(:handle($source_id), :description($file));
Expand Down

0 comments on commit 881c8d1

Please sign in to comment.