14 lines
291 B
C++
14 lines
291 B
C++
#include "pch.h"
|
|
#include <rusefi/timer.h>
|
|
|
|
TEST(util, timer) {
|
|
EngineTestHelper eth(engine_type_e::TEST_ENGINE);
|
|
Timer timer;
|
|
ASSERT_TRUE(timer.hasElapsedSec(3));
|
|
timer.reset();
|
|
ASSERT_FALSE(timer.hasElapsedSec(3));
|
|
|
|
eth.moveTimeForwardSec(4);
|
|
ASSERT_TRUE(timer.hasElapsedSec(3));
|
|
}
|