Commit 43e2fb1c authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[profiler] fix sleeping on windows for long intervals.

R=franzih@chromium.org

Change-Id: I5717db794fc797e7c3b0b8f122ddb6dc0702a99e
Reviewed-on: https://chromium-review.googlesource.com/941126Reviewed-by: 's avatarFranziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51755}
parent d2c2b398
......@@ -170,10 +170,11 @@ void ProfilerEventsProcessor::Run() {
// jitter, which is unacceptable for short profile intervals.
while (base::TimeTicks::HighResolutionNow() < nextSampleTime) {
}
}
#else
base::OS::Sleep(nextSampleTime - now);
} else // NOLINT
#endif
{
base::OS::Sleep(nextSampleTime - now);
}
}
// Schedule next sample. sampler_ is nullptr in tests.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment