PHP time_nanosleep() Function
Example
Delay execution of the current script by 3.5 seconds:
Run Example »
Definition and Usage
The time_nanosleep() function delays execution of the current script by a number of seconds and nanoseconds.
Syntax
time_nanosleep(
seconds,nanoseconds
)
| Parameters | Description |
|---|---|
| seconds | Required. Specifies the number of seconds to delay script execution. |
| nanoseconds | Required. Specifies the number of nanoseconds to delay script execution (must be less than 1,000,000,000). |
Technical Details
| Return value: | Returns 0 on success or FALSE on failure.
如果调用被信号中断,将返回带有延迟中剩余的秒数和延迟中剩余的纳秒数的关联数组。 |
| --- | --- | | PHP version: | 5+ | | Changelog: | This function was not implemented on Windows platforms until PHP 5.3.0. |
PHP Misc Reference Manual