[TYPO3-core] RFC Bug #11267: Use PHP5 version of function microtime()

Oliver Hader oliver at typo3.org
Thu Jun 4 15:13:12 CEST 2009


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

olly
-- 
Oliver Hader
TYPO3 Release Manager 4.3


More information about the TYPO3-team-core mailing list