I have example below:
// start time
// make mysql query here
for($i = 0; $i < 10; $i++) // for loop
{
// make dig lookup here
if (domain found){
// Update database
}
}
if (time <= 60 sec)// check current finishing time and compare
{
// make my sql update
}
What I want to do is to check how many seconds the time is after the loop and then if the time taken to finish the for loop is less than 60 sec than run the mysql update. If you don't understand me, you can ask me. I'm sorry for the language. I'm not good with English and I wasn't sure if this thing is possible to do. Thank you.
$time1 = time();
for($i = 0; $i < 10; $i++){ // for loop
// make dig lookup here
}
$time2 = time();
if (($time2 - $time1) < 60){
// make my sql update
}