parse-time
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?
class timers{
var $startTime;
/*
Function/class: starttiming(){}
Discription: This function will set the start time of the debug timer
Usage:
$class->starttiming();
*/
function starttiming(){
$this->startTime = substr(microtime(), 11) . "." . substr(microtime(), 2, 8);
}
/*
Function/class: stoptiming(){}
Discription: This function will stop the debug timer and result the time output
Usage:
$class->stoptiming();
*/
function stoptiming(){
$endTime = substr(microtime(), 11) . "." . substr(microtime(), 2, 8);
return(($endTime - $this->startTime));
}
}
?>
class timers{
var $startTime;
/*
Function/class: starttiming(){}
Discription: This function will set the start time of the debug timer
Usage:
$class->starttiming();
*/
function starttiming(){
$this->startTime = substr(microtime(), 11) . "." . substr(microtime(), 2, 8);
}
/*
Function/class: stoptiming(){}
Discription: This function will stop the debug timer and result the time output
Usage:
$class->stoptiming();
*/
function stoptiming(){
$endTime = substr(microtime(), 11) . "." . substr(microtime(), 2, 8);
return(($endTime - $this->startTime));
}
}
?>