Skip to content

Commit 195de2c

Browse files
committed
Merge branch 'master' of https://github.com/jermp/essentials
2 parents 43d0e78 + 0b17ae9 commit 195de2c

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

test/general_test.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,13 @@ void test_type_traits() {
6464
void test_advanced_timer() {
6565
essentials::timer_type t;
6666

67-
// Simulate 5 fast runs and 1 slow run (outlier)
67+
uint64_t ignore = 0;
6868
for (int i = 0; i < 6; ++i) {
6969
t.start();
70-
if (i == 0) {
71-
for (int j = 0; j < 1000000; ++j)
72-
; // Slow run
73-
} else {
74-
for (int j = 0; j < 100; ++j)
75-
; // Fast run
76-
}
70+
for (int j = 0; j < 10000000; ++j) ignore ^= j;
7771
t.stop();
7872
}
73+
essentials::do_not_optimize_away(ignore);
7974

8075
assert(t.runs() == 6);
8176

0 commit comments

Comments
 (0)