[TYPO3-core] RFC Bug #11267: Use PHP5 version of function microtime()
Susanne Moog
typo3 at susannemoog.de
Sun Jun 21 20:41:46 CEST 2009
Oliver Hader schrieb:
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=11267
>
> Branch: Trunk
>
> Problem:
> The PHP function microtime() delivered a string that has the current
> unixtime and the microseconds divided by a spacing character. These two
> parts are currently exploded by that space character and summarized.
> With PHP5 it's possible to use microtime(true) to get the same.
>
> Solution:
> Basically use microtime(true) instead of calculating the same value with
> extracting the numbers from a string. The following parts are changed:
> * t3lib_timetrack ($TT in frontend)
> + method mtime() didn't make much sense and is replaced by the new
> method getDifferenceToStarttime()
> + a new method getDifferenceToStarttime() delivers the difference
> between the starting time and a give microtime as float value
> + $TT->push and $TT->pull store the microtime as float value now
> * t3lib_div
> + milliseconds() was changed to avoid the mentioned string operations
+1 by reading
One remark:
"getDifferenceToStarttime" sounds odd to me - I'd say fromStarttime -
but I don't really know which one is right.
Regards,
Susanne
--
Susanne Moog
NEUSTA GmbH - www.neusta.de
More information about the TYPO3-team-core
mailing list