Skip to content

Commit 43e2fb1

Browse files
hashseedCommit Bot
authored andcommitted
[profiler] fix sleeping on windows for long intervals.
[email protected] Change-Id: I5717db794fc797e7c3b0b8f122ddb6dc0702a99e Reviewed-on: https://chromium-review.googlesource.com/941126 Reviewed-by: Franziska Hinkelmann <[email protected]> Commit-Queue: Yang Guo <[email protected]> Cr-Commit-Position: refs/heads/master@{#51755}
1 parent d2c2b39 commit 43e2fb1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/profiler/cpu-profiler.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ void ProfilerEventsProcessor::Run() {
170170
// jitter, which is unacceptable for short profile intervals.
171171
while (base::TimeTicks::HighResolutionNow() < nextSampleTime) {
172172
}
173-
}
174-
#else
175-
base::OS::Sleep(nextSampleTime - now);
173+
} else // NOLINT
176174
#endif
175+
{
176+
base::OS::Sleep(nextSampleTime - now);
177+
}
177178
}
178179

179180
// Schedule next sample. sampler_ is nullptr in tests.

0 commit comments

Comments
 (0)