• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 這有一個測試頁面執行時間的類

    發表于:2007-07-14來源:作者:點擊數: 標簽:
    ? class timer { var $StartTime = 0; var $StopTime = 0; var $TimeSpent = 0; function start(){ $this-StartTime = microtime(); } function stop(){ $this-StopTime= microtime(); } function spent() { if ($this-TimeSpent) { return $this-TimeSpent;
    <?
    class timer {  
        var $StartTime = 0;  
        var $StopTime = 0;  
        var $TimeSpent = 0;  

        function start(){  
            $this->StartTime = microtime();  
        }  

        function stop(){  
            $this->StopTime  = microtime();  
        }  

        function spent() {  
            if ($this->TimeSpent) {  
                return $this->TimeSpent;  
            } else {  
                $StartMicro = substr($this->StartTime,0,10);  
                $StartSecond = substr($this->StartTime,11,10);  
                $StopMicro  = substr($this->StopTime,0,10);  
                $StopSecond  = substr($this->StopTime,11,10);  
                $start = doubleval($StartMicro) + $StartSecond;  
                $stop  = doubleval($StopMicro) + $StopSecond;  
                $this->TimeSpent = $stop - $start;  
                return substr($this->TimeSpent,0,8)."秒";  
            }  
        }  // end function spent();  

    } //end class timer;  

    //例子:  
        $timer = new timer;  
        $timer->start();  
    /*
    你的代碼放在此處
    */

        $timer->stop();  
        echo "執行本SCRIPT共".$timer->spent();  
    ?>

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>