cloudll Posted June 2, 2015 Share Posted June 2, 2015 I am using this code to track how long my script has taken to load. $loadTime = (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']); I was wondering if there was a way to convert the loadTime into a more readable format, as it stands it outputs something like this: 0.038604021072388 Thanks Link to comment https://forums.phpfreaks.com/topic/296608-converting-microtime/ Share on other sites More sharing options...
Ch0cu3r Posted June 2, 2015 Share Posted June 2, 2015 Use number_format echo number_format($loadtime, 2); // output loadtime to 2 decimal places Link to comment https://forums.phpfreaks.com/topic/296608-converting-microtime/#findComment-1513054 Share on other sites More sharing options...
cloudll Posted June 2, 2015 Author Share Posted June 2, 2015 Awesome, thanks. Link to comment https://forums.phpfreaks.com/topic/296608-converting-microtime/#findComment-1513058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.