File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
shared/test/unit_test/utilities Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) 2017-2020 Intel Corporation
2+ * Copyright (C) 2017-2021 Intel Corporation
33 *
44 * SPDX-License-Identifier: MIT
55 *
1515
1616using namespace NEO ;
1717
18- TEST (TimerTest, WhenStartingEndingTimerThenDeltaInExpectedRange) {
19- Timer::setFreq ();
20- Timer timer;
21-
22- auto loopCount = 100u ;
23-
24- unsigned long long maxDelta = 0 ;
25- unsigned long long minDelta = -1 ;
26-
27- while (loopCount--) {
28- timer.start ();
29- timer.end ();
30- unsigned long long currentDelta = timer.get ();
31- maxDelta = std::max (currentDelta, maxDelta);
32- minDelta = std::min (currentDelta, minDelta);
33- }
34-
35- EXPECT_LE (minDelta, 10000u );
36- // thread switch may cost up to 2s
37- EXPECT_LE (maxDelta, 2000000000u );
38- }
39-
4018TEST (TimerTest, WhenGettingStartEndThenEndIsAfterStart) {
4119
4220 Timer::setFreq ();
You can’t perform that action at this time.
0 commit comments