function timer_read
Search API
7.x misc.inc | timer_read($name) |
6.x misc.inc | timer_read($name) |
4.x misc.inc | timer_read($name) |
5.x misc.inc | timer_read($name) |
Works with the timer_start() function to return how long it has been since the start.
1 call to timer_read()
- fp_http_request in includes/
misc.inc - Send a request through the Internet and return the result as an object.
File
- includes/
misc.inc, line 946 - This file contains misc functions for FlightPath
Code
function timer_read($name) {
global $timers;
if (isset($timers [$name]['start'])) {
list($usec, $sec) = explode(' ', microtime());
$stop = (float) $usec + (float) $sec;
$diff = round(($stop - $timers [$name]['start']) * 1000, 2);
if (isset($timers [$name]['time'])) {
$diff += $timers [$name]['time'];
}
return $diff;
}
}