Skip to content

Commit 81c61a0

Browse files
Don't peg the CPU in SlowCounter::Process_()
1 parent 6eec6a8 commit 81c61a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/components/SlowCounter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class SlowCounter final : public Component
5656
std::chrono::duration<double, std::micro> elapsedMs;
5757
do
5858
{
59+
std::this_thread::yield();
5960
elapsedMs = std::chrono::high_resolution_clock::now() - start;
6061
} while ( elapsedMs.count() < _waitMs );
6162

0 commit comments

Comments
 (0)