Commit 9ca75fb6 authored by Myles Borins's avatar Myles Borins Committed by Commit Bot

[time] remove High-resolution PrintError

A DCHECK in TimeTicks::HighResolutionNow was replaced with
a warning to stop systems from crashing. This warning broke
parts of the Node.js test-suite on certain systems.

The warning has been replaced with a comment documenting
this situation and a TODO to ensure we don't lose track
of this code path.

Bug: v8:7617
Bug: chromium:809016
Change-Id: I5e3af8c31817291d264af861514f34e3e1af9af2
Reviewed-on: https://chromium-review.googlesource.com/997153Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Myles Borins <mborins@google.com>
Cr-Commit-Position: refs/heads/master@{#52458}
parent 609c8059
...@@ -459,16 +459,11 @@ struct timeval Time::ToTimeval() const { ...@@ -459,16 +459,11 @@ struct timeval Time::ToTimeval() const {
// static // static
TimeTicks TimeTicks::HighResolutionNow() { TimeTicks TimeTicks::HighResolutionNow() {
static bool verified_high_resolution_available = false; // a DCHECK of TimeTicks::IsHighResolution() was removed from here
if (!verified_high_resolution_available) { // as it turns out this path is used in the wild for logs and counters.
if (!TimeTicks::IsHighResolution()) { //
OS::PrintError( // TODO(hpayer) We may eventually want to split TimedHistograms based
"\n\n" // on low resolution clocks to avoid polluting metrics
"WARNING: High-resolution TimeTicks are not available on this system."
"\n\n");
}
verified_high_resolution_available = true;
}
return TimeTicks::Now(); return TimeTicks::Now();
} }
......
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