ID: 9340
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Old-Bug Type: Unknown/Other Function
Bug Type: Date/time related
Assigned To: 
Comments:

Please try the latest dev build from http://www.php4win.de/ 
(under downloads) as this should be fixed already in CVS. IIRC

--Jani


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

[2001-02-19 13:16:08] [EMAIL PROTECTED]
here is the wrong code (current) + my correction:

---- > Wrong (current) <----

PHP_FUNCTION(usleep)
{
#if HAVE_USLEEP
        pval **num;

        if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(num);
        usleep((*num)->value.lval);
#endif
}

---- > Correction <----
        
PHP_FUNCTION(usleep)
{
        pval **num;

        if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
        convert_to_long_ex(num);
#if HAVE_USLEEP
        usleep((*num)->value.lval);
#elif PHP_WIN32
   Sleep( ((*num)->value.lval+999)/1000);
#endif
}

Dror.

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



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9340&edit=2


-- 
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