summaryrefslogtreecommitdiff
path: root/lib/Benchmark.pm
diff options
context:
space:
mode:
authorRicardo SIGNES <rjbs@cpan.org>2009-01-20 18:32:17 -0500
committerVincent Pit <vince@profvince.com>2009-01-21 16:54:16 +0100
commit2b393bf410d9f1bf0b80132c4e8b5d6707a139f8 (patch)
treefba97a93f415d38a8053cb90ef68b23c24b7de7e /lib/Benchmark.pm
parent797f796a9610b63f252016d76732152c8ff9fb39 (diff)
downloadperl-2b393bf410d9f1bf0b80132c4e8b5d6707a139f8.tar.gz
now get non-dual lived code
Diffstat (limited to 'lib/Benchmark.pm')
-rw-r--r--lib/Benchmark.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Benchmark.pm b/lib/Benchmark.pm
index 7e744a634a..19a034318d 100644
--- a/lib/Benchmark.pm
+++ b/lib/Benchmark.pm
@@ -81,9 +81,9 @@ countit - see how many times a chunk of code runs in a given time
Returns the current time. Example:
use Benchmark;
- $t0 = new Benchmark;
+ $t0 = Benchmark->new;
# ... your code here ...
- $t1 = new Benchmark;
+ $t1 = Benchmark->new;
$td = timediff($t1, $t0);
print "the code took:",timestr($td),"\n";
@@ -91,9 +91,9 @@ Returns the current time. Example:
Enables or disable debugging by setting the C<$Benchmark::Debug> flag:
- debug Benchmark 1;
+ Benchmark->debug(1);
$t = timeit(10, ' 5 ** $Global ');
- debug Benchmark 0;
+ Benchmark->debug(0);
=item iters