17 lines
348 B
PHP
17 lines
348 B
PHP
<?php
|
|
namespace ProVM\Performance;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
abstract class AbstractPerformance extends TestCase
|
|
{
|
|
protected float $startTime;
|
|
protected function start(): void
|
|
{
|
|
$this->startTime = microtime(true);
|
|
}
|
|
protected function end(): float
|
|
{
|
|
return microtime(true) - $this->startTime;
|
|
}
|
|
} |