1) Removed ending PHP ie(?>) in class.
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>
This commit is contained in:
@@ -84,4 +84,4 @@ class timer
|
|||||||
return $this->udate($format, ($this->endTimer-$this->startTimer)/$avg_count);
|
return $this->udate($format, ($this->endTimer-$this->startTimer)/$avg_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
// == TIMER CLASS ====================================
|
// == TIMER CLASS ====================================
|
||||||
require_once 'classes/timer.php';
|
require_once 'class/timer.php';
|
||||||
// -- Init Class
|
// -- Init Class
|
||||||
$timer = new timer();
|
$timer = new timer();
|
||||||
//
|
//
|
||||||
@@ -15,4 +15,6 @@
|
|||||||
echo $timer->format_time() . '<br />';
|
echo $timer->format_time() . '<br />';
|
||||||
echo $timer->avg_time(5) . '<br />';
|
echo $timer->avg_time(5) . '<br />';
|
||||||
echo $timer->format_avg_time(5);
|
echo $timer->format_avg_time(5);
|
||||||
// ===================================================
|
// ===================================================
|
||||||
|
|
||||||
|
$timer = null;
|
||||||
Reference in New Issue
Block a user