<?php
/**
 * Created by PhpStorm.
 * User: stanley-king
 * Date: 16/1/26
 * Time: 上午10:32
 */


class statistic_tm
{
    private $start;
    private $end;
    public function __construct()
    {
        $this->start = microtime(TRUE);
    }

    public function end()
    {
        $this->end = microtime(TRUE);
    }

    public function elapsed($dec = 3)
    {
        $this->end = microtime(TRUE);
        return number_format(($this->end - $this->start),$dec);
    }
}