> On Tue, Sep 04, 2001 at 08:48:52AM +0200, Alexander Jäger wrote :
> > i wanted to do a waiting function and read on php.net, that usleep does
not
> > work under windows. so i did my own function and got problems with
microtime
> > and gettimeofday
> > does anybody has expiriences that these doesn't work under windows?
> >
> > e.g. i got for the usec - value of gettimeofday values higher than one
> > million?
>
> It would be really interesting if someone can do microsecond
> timer with NT architecture (without special hardware). To my
> knowledge NT architecture does no support microsecond timer
> resolution. It only has a 32bit tick counter whose resolution is
> miliseconds (remmeber the 49.7 days reboot of some version of
> Win95).  If you have additional hardware you can take advantage by
> extending this to a 64bit counter with microseconds resolution
> .... poor NT ...

I applied a patch to the gettimeofday in the windows port that reduced the
accuracy to milliseconds from microseconds, thinking about it I didnt check
at the time if it was compatible with unix values returned, the only thing I
remember thinking was well even if this patch was broken it was a lot less
broken than things were before (the time was got in two calls previously so
one half of the returned value was about 0.05 seconds out from the other
value..)

I thought there was a note in the manual about this difference between Unix
and Windows resolution with this function although I am not sure (usleep
doesnt work on windows at all.. although if we can round to the nearest
millisecond and sleep that way it might be worth thinking about).

Anyway what I was trying to say is those functions are fubar under NT as it
is and if anyone can think of a better way to do the timings and usleep then
it would be a good addition to the source code.

- James


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to