Log in

View Full Version : What's microtime() ?


Jawelin
03-28-2002, 12:11 PM
:cheeky:

I found a very strange behavior of the subject php function on my server.

First of all:
Linux shared running PHP v4.1.2 & MySQL v3.23.45;
GZip level 1 enabled on my pages (cheers to Nakkid... :lick: )

Well. Php page:
At the beginning, I put:

$customstarttime=microtime();
Then, the script does a lot of actions, including a dozen of MySQL queries...
Then, at the end of the page:
$customendtime=microtime();

$pageloadtime=$customendtime-$customstarttime;

How hell $pageloadtime could be NEGATIVE, if page took almost 3-4 seconds to display, even on fast connections ???

:mad: :mad: :mad:

Thanks

Admin
03-28-2002, 02:31 PM
Maybe it has something to do with the fact that microtime() doesn't return a number, but rather a string? ;) Read the PHP docs. :)

Jawelin
03-28-2002, 04:07 PM
Yeah!

I did it .... :cross-eyed:
... just after cliked on submit onto this post ... :o

Then, later, I posted ---> THAT #174 (https://vborg.vbsupport.ru/showthread.php?postid=233674#post233674) <--- , but forgot to delete here.... :ogre:

:speechless:
Thnx