SpiecsEngine
 
Loading...
Searching...
No Matches

◆ TEST() [40/59]

SpicesTest::TEST ( ScopeTimer_test ,
ScopeTimer  )

Testing Spices::ScopeTimer.

Definition at line 17 of file ScopeTimer_test.h.

17 {
18
20
21 {
22 SPICESTEST_PROFILE_SCOPE("Cost should be 1 ms.");
23 SCOPE_TIME_COUNTER("Cost should be 1 ms.");
24
25 std::this_thread::sleep_for(std::chrono::milliseconds(1));
26 }
27
28 {
29 SPICESTEST_PROFILE_SCOPE("Cost should be 100 ms.");
30 SCOPE_TIME_COUNTER("Cost should be 100 ms.");
31
32 std::this_thread::sleep_for(std::chrono::milliseconds(100));
33 }
34
35 {
36 SPICESTEST_PROFILE_SCOPE("Cost should be 300 ms.");
37 SCOPE_TIME_COUNTER("Cost should be 300 ms.");
38
39 std::this_thread::sleep_for(std::chrono::milliseconds(300));
40 }
41 }
#define SPICESTEST_PROFILE_SCOPE(name)
#define SPICESTEST_PROFILE_FUNCTION()
#define SCOPE_TIME_COUNTER(...)
Definition ScopeTimer.h:49