setInterval PHP
setInterval(function(){
echo "hi!\n";
}, 1000);
JavierMendozain
setInterval(function(){
echo "hi!\n";
}, 1000);
function setInterval($f, $milliseconds)
{
$seconds=(int)$milliseconds/1000;
while(true)
{
$f();
sleep($seconds);
}
}
$countDownDate = (int)microtime(true);
$distance = 180 - $countDownDate % 180;
$minutes = $distance / 60;
$seconds = $distance % 60;