$start = microtime(true);

sleep(3);
// Your script code here

$end = microtime(true);
$latency = round($end - $start, 2);
echo "Script execution time: " . $latency . " seconds";
The
round
function will round the result to
2
decimals
by Valeri Tandilashvili
11 months ago
PHP
0
Pro tip: use ```triple backticks around text``` to write in code fences