forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixit: Fork base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks
TimeTicks was being overused for time values from three different clock sources. This change splits the class into three separate classes: The general-purpose monotonic time (TimeTicks), the thread-local run time (ThreadTicks), and the global system trace time (TraceTicks). With this change, the compiler is now able to use type-checking to guarantee values from different clocks are not being mixed when doing time math. This is the 2nd in a two-part change. Part 1 factored-out the comparison and math operator overloads common to base::Time and base::TimeTicks into a templated base class. The new ThreadTicks and TraceTicks time classes also inherit from that base class. Updated base/trace_event/* and a handful of outside-of-base uses of ThreadNow() and NowFromSystemTraceTime() to use the new classes. A bug was identified and fixed, in src/ui/gl/angle_platform_impl.cc, where values from TimeTicks::Now() were being erroneously provided to base::TraceEvent instead of values from NowFromSystemTraceTime(). BUG=467417 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel NOTRY=true Review URL: https://codereview.chromium.org/1122153002 Cr-Commit-Position: refs/heads/master@{#332080}
- Loading branch information
1 parent
6cccd7e
commit 1ab506a
Showing
38 changed files
with
402 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.