[wp-trac] [WordPress Trac] #26874: timer_stop() returns a string, not a float
WordPress Trac
noreply at wordpress.org
Sun Feb 25 16:40:04 UTC 2024
#26874: timer_stop() returns a string, not a float
----------------------------------------+---------------------------
Reporter: GregLone | Owner: jackreichert
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.9
Component: Bootstrap/Load | Version: 3.9
Severity: minor | Resolution: fixed
Keywords: needs-patch good-first-bug | Focuses: docs
----------------------------------------+---------------------------
Comment (by mizuki1rg):
you're discussing a documentation issue related to the timer_stop()
function. The inline documentation incorrectly states that the function
returns a float when in reality it returns a string. There's a discussion
about whether the documentation should be corrected to reflect the actual
behavior of the function or if the function's behavior should be changed
to return a float.
In this case, it's suggested that the documentation should be updated to
accurately reflect the behavior of the function. The function likely
returns a string because the time value is formatted for human
consumption, rather than being used for precise profiling purposes.
Therefore, it's appropriate for the documentation to clarify that the
return value is a string representing a formatted time rather than a
float.
Regarding the attribution of credit (props), typically, the person who
writes the patch to fix the issue would receive credit. However, in some
cases, credit may also be given to others who contributed to the
discussion or provided insights that helped in resolving the issue.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26874#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list