1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00
2021-02-18 21:20:23 +08:00

27 lines
378 B
PHP

<?php
namespace App\Library;
class Benchmark
{
protected $startTime = 0;
protected $endTime = 0;
public function start()
{
$this->startTime = microtime(true);
}
public function stop()
{
$this->endTime = microtime(true);
}
public function getElapsedTime()
{
return $this->endTime - $this->startTime;
}
}