中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

php計(jì)算頁(yè)面執(zhí)行時(shí)間代碼

2018-07-20    來(lái)源:open-open

容器云強(qiáng)勢(shì)上線!快速搭建集群,上萬(wàn)Linux鏡像隨意使用
<? 

class  c_Timer  { 
        var  $t_start  =  0; 
        var  $t_stop  =  0; 
        var  $t_elapsed  =  0; 

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

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

        function  elapsed()  { 
                if  ($this->t_elapsed)  { 
                        return  $this->t_elapsed; 
                }  else  { 
                            $start_u  =  substr($this->t_start,0,10);   
$start_s  =  substr($this->t_start,11,10); 
                              $stop_u    =  substr($this->t_stop,0,10);     
$stop_s    =  substr($this->t_stop,11,10); 
                        $start_total  =  doubleval($start_u)  +  $start_s; 
                              $stop_total    =  doubleval($stop_u)  +  $stop_s; 

                        $this->t_elapsed  =  $stop_total  -  $start_total; 

                        return  $this->t_elapsed; 
                } 
        } 
}; 

/*  Here's  an  example  usage: 

        $timer  =  new  c_Timer; 

        $timer->start(); 
        echo  "<hr>"; 
        $timer->stop(); 

        echo  $timer->elapsed(); 

*/ 
?>

標(biāo)簽:

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請(qǐng)聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點(diǎn)!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請(qǐng)與原作者聯(lián)系。

上一篇:一個(gè)PHP緩存類

下一篇:Python3使用qrcode生成二維碼