Returns the current time. By getting the current time before and after running the code, you can calculate the time it takes the code to run.
Clears the entire cache. Exported on request.
Clears the cached time for count rounds of the null loop. Exported on request.
Enables or disables debugging by setting the $Benchmark::Debug flag.
Disables use of the cache. Exported on request.
Resumes caching. Exported on request.
timediff (t1, t2)
Calculates the difference between two times and returns the difference as a Benchmark object suitable for passing to timestr. Always exported.
timeit (count, code)
Runs code and reports the time it took. Always exported. Takes the following arguments:
timestr (timediff[, style[, format]])
Converts times to printable strings. Always exported. Takes the following arguments:
timethese (count, \%codehashref[, style])
Times each of several pieces of code and reports the results separately. Always exported. Takes the following arguments:
timethis (count, code[, title[, style]])
Runs a chunk of code several times. Always exported. Takes the following arguments:
Copyright © 2002 O'Reilly & Associates. All rights reserved.