Posts Tagged ‘timediff’


agosto 19, 2010

If you use the Benchmark module, you can know the CPU time …
use Benchmark;
$tiempo_Inicial = new Benchmark;
# your code
$tiempo_Final = new Benchmark;
$tiempo = timediff($tiempo_Final, $tiempo_Inicial);
print timestr($tiempo),”\n”;
# the previous line shows the total system time in seconds,
# and the CPU time in seconds ( user + system ) of the previous code
# more information in:
# perldoc Benchmark
# and to see the source of this:
# man time