在PHP
For Linux-based systems, if you only require wall-clock time (total time since the script's execution started), here's how you can calculate it:
// Start the timer at the beginning of the script $ time_start = microtime(true); //在這裡執行您的腳本 //停止計時器 $ time_end = microtime(true); //計算執行時間 $ execution_time =($ time_end -$ time_start) / 60; //顯示執行時間 迴聲'總執行時間:'。 $ execution_time。 'mins';請注意,此方法包括等待外部資源的時間,與Max_execution_time不同,它僅考慮PHP執行時間。
免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。
Copyright© 2022 湘ICP备2022001581号-3