Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f244f10c authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Switch SchedulerClock to std::chrono::steady_clock

According to
https://en.cppreference.com/w/cpp/chrono/high_resolution_clock, we
should prefer steady_clock or system_clock, depending on our needs. We
already assert that it is_steady, and we use values of this type as if
they *are* from steady_clock.

Specifically, android::scheduler::TimePoint, used throughout
SurfaceFlinger, inherits from SchedulerClock::time_point. When computing
the earliestPresentTime, we use TimePoints (aka a subclass of
high_resolution_clock::time_point), but then we assign the result to
CompositionRefreshArgs.earliestPresentTime, which is a
steady_clock::time_point.

Make this consistent by using the recommended type throughout.

Test: m

Change-Id: I10a3ba4829a60dfc83256cb9fea3736a6c8a0f94
parent 31d41415
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment