ID:               26449
 Comment by:       antispammail at gmx dot de
 Reported By:      marcus at quintic dot co dot uk
 Status:           No Feedback
 Bug Type:         Feature/Change Request
 Operating System: Windows XP
 PHP Version:      4.3.4
 Assigned To:      wez
 New Comment:

I also really NEEED this usleep function to work,
but tested the latest php 5 as advised an
it does not work :(

Have you removed this feature allready again? why?

according to this :
http://groups.google.com/groups?q=usleep+win32&hl=de&lr=&ie=UTF-8&oe=UTF-8&selm=9401pp%242fgt%241%40FreeBSD.csie.NCTU.edu.tw&rnum=3

===========================================================
[2001-01-15 18:22:56] [EMAIL PROTECTED]
usleep exists on Win32 as the Sleep command (it takes a millisecond
value as parameter) so here is the patch for making the usleep() php
function to work on win32 platforms:

in main/win95nt.h, line 27:

#define php_sleep(t) Sleep(t*1000)

add the following line so it looks like:
#define php_sleep(t) Sleep(t*1000)
#define usleep(t)  Sleep(t)

and in config.w32.h, line 93:

/* Define if you have the usleep function.  */
#undef HAVE_USLEEP

change it to:

/* Define if you have the usleep function.  */
#define HAVE_USLEEP 1

-Christophe Thibault
Nullsoft (www.nullsoft.com/www.winamp.com)
===========================================================

I just don't know how to do this change as a "user" of php ... PLEASE
HELP and put this in the new release!

Chris


Previous Comments:
------------------------------------------------------------------------

[2003-12-04 02:26:47] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2003-11-29 17:58:18] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

I've implemented this in PHP 5.
Since it requires win98 and later, it might not go into the php4
branch.
Please try a php 5 snapshot and let us know how well it works for you.

------------------------------------------------------------------------

[2003-11-29 16:11:37] marcus at quintic dot co dot uk

:) Hell, who need microseconds anyway - being able to 
delay for less than a second without chewing cpu would be 
enough for me. Thanks.

------------------------------------------------------------------------

[2003-11-29 16:08:22] [EMAIL PROTECTED]

Sleep() has millisecond resolution, not microsecond resolution.

I'll look into getting usleep working under win32, but
make no promises.

------------------------------------------------------------------------

[2003-11-29 15:57:45] marcus at quintic dot co dot uk

So every other language I know manages to call Sleep under  
win32 and it works, but php doesnt?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26449

-- 
Edit this bug report at http://bugs.php.net/?id=26449&edit=1

Reply via email to