Commit 369345e3 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Use TimeDelta::operator/() more, base/ edition.

Bug: 1104532
Change-Id: Icd6a1b8331d30837f0b60937dd55f23d60d334fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355009
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798121}
parent 8e3c819d
......@@ -81,8 +81,7 @@ TimeTicks GetNextSampleTimeImpl(TimeTicks scheduled_current_sample_time,
// The minimum number of sampling intervals required to get from the scheduled
// current sample time to the earliest next sample time.
const int64_t required_sampling_intervals = static_cast<int64_t>(
std::ceil(minimum_time_delta_to_next_sample.InMicrosecondsF() /
sampling_interval.InMicroseconds()));
std::ceil(minimum_time_delta_to_next_sample / sampling_interval));
return scheduled_current_sample_time +
required_sampling_intervals * sampling_interval;
}
......
......@@ -309,7 +309,7 @@ double Time::GetHighResolutionTimerUsage() {
// activation.
used_time += now - g_high_res_timer_last_activation;
}
return used_time.InMillisecondsF() / elapsed_time.InMillisecondsF() * 100;
return used_time / elapsed_time * 100;
}
// static
......
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