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

Commit d0ed571b authored by Andy McFadden's avatar Andy McFadden Committed by Android (Google) Code Review
Browse files

Merge "Add mutex"

parents 8090e6ae 150ecd8c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -509,6 +509,7 @@ void DispSync::resetErrorLocked() {
}

nsecs_t DispSync::computeNextRefresh(int periodOffset) const {
    Mutex::Autolock lock(mMutex);
    nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
    return (((now - mPhase) / mPeriod) + periodOffset + 1) * mPeriod + mPhase;
}