[wp-trac] [WordPress Trac] #39163: Use REQUEST_TIME_FLOAT for timing
WordPress Trac
noreply at wordpress.org
Fri Apr 23 19:47:58 UTC 2021
#39163: Use REQUEST_TIME_FLOAT for timing
----------------------------+--------------------------
Reporter: andy | Owner: jorbin
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.8
Component: Bootstrap/Load | Version: 4.8
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: performance
----------------------------+--------------------------
Changes (by jorbin):
* owner: (none) => jorbin
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"50786" 50786]:
{{{
#!CommitTicketReference repository="" revision="50786"
Bootstrap/Load: Add Function for reliable timing data
Adds timer_float which can be used to get the time elapsed so far during
the PHP script. Should make it easier to display the page generation time
in the footer of admin.
WordPress should expose timing data as a float in the most accurate manner
possible. timer_stop() has two problems: it uses an initial timestamp
generated later than it needs to be and its formatted return value can not
reliably be used as a number (some locales swap commas and periods, for
example).
Props andy, matt, jorbin.
Fixes #39163.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39163#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list