do you realy think that convertion to String and back to float can be fast??
this function runs 10 times faster than utime() :
function fastUtime()
{
$t = gettimeofday();
return (float) ($t['sec'] + $t['usec'] / 1000000.0);
}
![]() |
|
||||||||||
|
gettimeofdayОписаниеarray gettimeofday ( void )Эта функция является интерфейсом к системному вызову gettimeofday(2). Она возвращает ассоциативный массив, содержащий информацию, полученную от системной функции.
gettimeofday
void0( the dog )yandex.ru
20-Sep-2006 11:07
do you realy think that convertion to String and back to float can be fast??
lucas dot karisny at linuxmail dot org
13-Feb-2005 06:26
A small improvement on getTimer. Using vsprintf instead of sprintf there is no need to assign the array:
middleto at pilot dot msu dot edu
12-Aug-1999 07:49
The types of DST correction (from sys/time.h on a Linux system): |