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}