microtime() on win32, serious bug || not existant functionality

From: Date: Sun, 11 Jun 2000 14:57:52 +0000
Subject: microtime() on win32, serious bug || not existant functionality
Groups: php.dev 
Request: Send a blank email to php-dev+get-20999@lists.php.net to get a copy of this message
Hi, is microtime() supposed not to work under win32? If it is, there´s a serious bug in it. The following script works as intended (it produces no lines with an *) running on Linux - the same script under win32 fails at some points (search for "*" and exampine the values around it)... microtime() *seems* to work under win32, it produces a string with a micro and a timestamp part, subsequent values are raising compared to the ancestor in the micro part - the timestamp part seems *not* to be incremented after the micro part exceeds 0,9(period), it is incremented from time to time - I even don´t know when, perhaps every fourth pass... If it is not intended to work under win32 a warning should appear OR it should be implemented if possible... regards <? for ($i=1;$i<=5000;$i++) { list($micro,$time)=explode(" ",microtime()); $add=$micro+$time; print ($last? ($add<$last ? '*' : '') : '')."M\t$micro\tT\t$time\tS\t$ add<BR>"; $last=$add; } ?> -- o----------0-¬---------O-·---¬----o---®-----o o O ° . | http://www.kiffen.de | pRoteçt y0ur bRaín |0 O ° ¤ ° · 0°·³°²'²³-¹'³´³°^°³~³²³°'³²²¨³²^³¹³²°²³`³º³°Þ ° o © ° . · | psychedelic experience | gott@kiffen.de | O ° o ° o-¬--o--0-----©-·--O-----o-----0-¤----------o 0 ° · ° . ¤ ·

« previous php.dev (#20999) next »