timer_float() WordPress Function
The timer_float() WordPress function is used to display the time since a given date in floating point format. The function takes two arguments: the date to calculate the time since, and an optional format string. The default format string is "%.2f" which will display the time since the given date in hours, minutes, and seconds.
timer_float() #
Get the time elapsed so far during this PHP script.
Contents
Description
Uses REQUEST_TIME_FLOAT that appeared in PHP 5.4.0.
Return
(float) Seconds since the PHP script started.
Source
File: wp-includes/load.php
function timer_float() { return microtime( true ) - $_SERVER['REQUEST_TIME_FLOAT']; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |