includes/common.php
changeset 269 4da2dfc28728
parent 267 105457df35e5
child 270 a48b72312f6d
equal deleted inserted replaced
268:4d9a4da1975b 269:4da2dfc28728
    43  * Returns a floating-point number with the current UNIX timestamp in microseconds. Defined very early because we gotta call it
    43  * Returns a floating-point number with the current UNIX timestamp in microseconds. Defined very early because we gotta call it
    44  * from very early on in the script to measure the starting time of Enano.
    44  * from very early on in the script to measure the starting time of Enano.
    45  * @return float
    45  * @return float
    46  */
    46  */
    47 
    47 
    48 function microtime_float()
    48 // First check to see if something already declared this function.... it happens often.
    49 {
    49 if ( !function_exists('microtime_float') )
    50   list($usec, $sec) = explode(" ", microtime());
    50 {
    51   return ((float)$usec + (float)$sec);
    51   function microtime_float()
       
    52   {
       
    53     list($usec, $sec) = explode(" ", microtime());
       
    54     return ((float)$usec + (float)$sec);
       
    55   }
    52 }
    56 }
    53 
    57 
    54 // Determine starting time
    58 // Determine starting time
    55 global $_starttime;
    59 global $_starttime;
    56 $_starttime = microtime_float();
    60 $_starttime = microtime_float();