1. Go to this page and download the library: Download zkrat/while-timer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zkrat / while-timer example snippets
do{
echo 'Hello Word: every 100 milliseconds ('.\zkrat\WhileTimer::getCounter().')'.PHP_EOL;
}while(\zkrat\WhileTimer::sleep(2,0.1));
//==========================================
while(\zkrat\WhileTimer::sleep(2,0.1)){
echo 'Hello Word: every 100 milliseconds ('.\zkrat\WhileTimer::getCounter().')'.PHP_EOL;
};
do{
echo 'Hello Word each 1 second ('.\zkrat\WhileTimer::getCounter().')'.PHP_EOL;
}while(\zkrat\WhileTimer::sleep(6,1));
do{
echo 'Hello Word each 0.5 seconds ('.\zkrat\WhileTimer::getCounter().')'.PHP_EOL;
}while(\zkrat\WhileTimer::usleep(3000000,500000));
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.