Advertisement
4_2005-2006 Miscellaneous #162518

Page Load Time

This small script will let you output how much time (in seconds) it took for the page to expell. i.e. 0.501 seconds

AI

Tóm tắt bởi AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Mã nguồn
original-source
/*<br>
*@author steve gricci <[email protected]><br>
*@access public<br>
*@skill beginner<br>
*@site www.deepcode.net<br>
*/<br><br>
//put at begining of file<br><br>
function utime (){<br>
  $time = explode( " ", microtime());<br>
  $usec = (double)$time[0];<br>
  $sec = (double)$time[1];<br>
  return $sec + $usec;<br>
}<br>
 $start = utime(); <br><br>
//put at end of page before /body and /html tags<br><br>
$end = utime(); $run = $end - $start; echo "Page expelled in " . substr($run, 0, 5) . " secs.";<br> 
//Nothing after this
Upload
Bình luận gốc (3)
Được khôi phục từ Wayback Machine