2) Corrected class path, as it had the old name. 2) Nulled timer at the end of the example. Signed-off-by: Rick Hays <rhays@haysgang.com>
20 lines
610 B
PHP
20 lines
610 B
PHP
<?php
|
|
// == TIMER CLASS ====================================
|
|
require_once 'class/timer.php';
|
|
// -- Init Class
|
|
$timer = new timer();
|
|
//
|
|
// -- Run the Timer
|
|
$timer->start(); // <- Places a value for Start of Timer
|
|
sleep(5); // <- Pause
|
|
$timer->end(); // <- Places a value for End of Timer
|
|
// -- Output the Results
|
|
echo $timer->startTimer . '<br />';
|
|
echo $timer->endTimer . '<br />';
|
|
echo $timer->time() . '<br />';
|
|
echo $timer->format_time() . '<br />';
|
|
echo $timer->avg_time(5) . '<br />';
|
|
echo $timer->format_avg_time(5);
|
|
// ===================================================
|
|
|
|
$timer = null; |