startTimer( "Program runtime", "Accumulators" );
$debug->switchTimer( "Start", "Program runtime" );
// Measure the time of writing "hello world".
// The name of the timer is: "Hello world" and it will be placed in the group: "output".
$debug->startTimer ("Hello world", "output" );
echo "Hello world
";
$debug->stopTimer( "Hello world" );
// Replace the "Start" timer for "Half the way".
$debug->switchTimer( "Half the way", "Start" );
// Measure the time of writing "cruel world".
$debug->startTimer( "Goodbye cruel world", "output" );
echo "Goodbye cruel world
";
$debug->stopTimer( "Goodbye cruel world" );
// Stop the last timer.
$debug->switchTimer( "Stop", "Half the way" );
$debug->stopTimer( "Stop" );
// Get HTML output.
$output = $debug->generateOutput();
echo "
";
echo $output;
?>