PHP time_nanosleep() 함수
예시
2.5초 동안 현재 스크립트 실행 지연:
<?php
if (time_nanosleep(2,500000000) === true)
{
echo "Slept for 2,5 seconds";
}
?>
정의 및 사용
time_nanosleep() 함수는 지정된 초 및 나노초 동안 현재 스크립트의 실행을 지연시킵니다.
통사론
time_nanosleep(seconds,nanoseconds)
매개변수 값
Parameter | Description |
---|---|
seconds | Required. Specifies the number of seconds to delay the script |
nanoseconds | Required. Specifies the number of nanoseconds to delay the script (must be less than 1,000,000,000) |
기술적 세부 사항
반환 값: |
성공하면 TRUE를, 실패하면 FALSE를 반환합니다. 호출이 신호에 의해 중단된 경우 지연에 남은 시간(초 또는 나노초)과 함께 연관 배열이 반환됩니다. |
---|---|
PHP 버전: | 5+ |
변경 로그: | 이 기능은 PHP 5.3.0 이전의 Windows 플랫폼에서는 작동하지 않았습니다. |
❮ PHP 기타 참조