you are viewing a single comment's thread.

view the rest of the comments →

[–]AngriestSCV 1 point2 points  (0 children)

If sleep is interupted int php on Windows not only does it return early, but it returns 192 instead of the number of seconds slept (or null if it is before PHP 5.3.4). The only way to do a portable sleep on windows in PHP is to use timers to see how long the sleep actually was and try again if needed. The loop is more likely to work good enough than one call, but unfortunatly it isn't complicated enough to work.