$start = microtime(true); sleep(3); // Your script code here $end = microtime(true); $latency = round($end - $start, 2); echo "Script execution time: " . $latency . " seconds";
round
2
Pro tip: use ```triple backticks around text``` to write in code fences