在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