Posts execution time calculation
Post
Cancel

execution time calculation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//src - http://stackoverflow.com/a/18336968

//place this before any script you want to calculate time
$time_start = microtime(true);

// do something

// Display Script End time
$time_end = microtime(true);

//dividing with 60 will give the execution time in minutes other wise seconds
$execution_time = ($time_end - $time_start)/60;

//execution time of the script
echo '**Total Execution Time:** '.$execution_time.' Mins';

origin - http://www.pipiscrew.com/?p=6670 php-execution-time-calculation

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags