Fix timer tests on HHVM

This commit is contained in:
Kijin Sung 2016-03-20 10:04:03 +09:00
parent eb1c6e33e6
commit 0bbe4ac07f

View file

@ -38,11 +38,9 @@ class TimerTest extends \Codeception\TestCase\Test
function testMultipleTimers()
{
$t1 = Rhymix\Framework\Timer::start('timer1');
usleep(5000);
usleep(10000);
$t2 = Rhymix\Framework\Timer::start('timer2');
usleep(1000);
$t3 = Rhymix\Framework\Timer::stop('timer1');
usleep(2000);
$t4 = Rhymix\Framework\Timer::stop('timer2');
$this->assertGreaterThanOrEqual($t1, $t2);
@ -52,7 +50,7 @@ class TimerTest extends \Codeception\TestCase\Test
function testTimerFormat()
{
$t1 = Rhymix\Framework\Timer::start();
usleep(1000);
usleep(10000);
$t2 = Rhymix\Framework\Timer::stopFormat();
$this->assertRegexp('/^[0-9\.,]+ms$/', $t2);