Definitions and usage
php function Microtime () returns the current Unix timestamp and microsecond number.
php function Microtime () syntax
Microtime (Get_as_float)
php function microtime () parameter and description
Get_as_float If the get_as_float argument is given and its value is equivalent to TRUE, the function returns a floating-point number.
Description
The PHP function Microtime () is only available under an operating system that supports Gettimeofday () system calls.
If invoked without an optional argument, this function returns a string in the format "msec sec", where the SEC is the number of seconds since the Unix era (0:00:00 January 1, 1970 GMT), and the msec is the microsecond portion. Both parts of a string are returned in seconds.
Example
Copy Code code as follows:
Echo (Microtime ()); 0.25139300 1138197510
The PHP function Microtime () is commonly used as follows:
Copy Code code as follows:
$mtime =explode (", Microtime ());
$startTime = $mtime [1]+ $mtime [0];
Echo $startTime; 1385976275.33