note 113683 deleted from datetime.diff by tularis
| From: | tularis@php.net | Date: | Fri, 15 Nov 2013 16:20:01 +0000 |
| Subject: | note 113683 deleted from datetime.diff by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197532@lists.php.net to get a copy of this message | ||
Note Submitter: sudhakar dot mangipudi at gmail dot com
----
I found a way to show the time elapsed while processing in each iteration of your bulk data
$datetime1 = new DateTime('now');
foreach($arr as $val){
$result = $val * 2;
}
$datetime3 = new DateTime('now');
$interval_main = $datetime1->diff($datetime3);
echo "It took ".$interval_main->format('%H:%I:%S'). " sec's to
finish the program!" ;
}