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

Commit 150ecd8c authored by Andy McFadden's avatar Andy McFadden
Browse files

Add mutex

Change-Id: I81072031e74a5cca8384e4e8bce4babf2187d8bb
parent 98e1ebc0
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;
}