PHP time_sleep_until() Function

❮ PHP Misc Reference

Example

Let the script sleep for 3 seconds:

<?php
time_sleep_until(time()+3);
echo "Hello";
?>
Try it Yourself »

Definition and Usage

The time_sleep_until() function is used to make a script sleep until the specified time.


Syntax

time_sleep_until(timestamp)

Parameter Values

Parameter Description
timestamp Required. Specifies when the script should wake

Technical Details

Return Value: Returns TRUE on success, or FALSE on failure
PHP Version: 5.1.0+
Changelog: This function did not work on Windows platforms until PHP 5.3.0

❮ PHP Misc Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.