Debug Object Wiki
a PHP object designed to aid in debugging your codebase.
Brought to you by:
john_schlick
The debug timer is very easy to use. Define it and call its get method.
$debug_timer = new DebugTimer();
or alternately:
if ($debug_object->execute_debug(-1)) { $debug_object->debug_output("Start timer"); $debug_timer = new Debug_Timer(); }
To display the output, call get_interval
if ($debug_object->execute_debug(-1)) { $debug_object->debug_output("Exit - " . $debug_timer->get_interval(true)); }
The full definition is:
function get_interval($output_text=false, $reset_start=true)
$output_text: a boolean that determines whether to return a text string with "took" duration "seconds." or just the real.
$reset_start: a boolean that is used to determine whether to reset the timers start time or not.