You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// wait until time to display next frame
while(nextFrameTime_ms > millis());
// calculate time to display next frame
nextFrameTime_ms = millis() + (10 * frameDelay);
if(updateScreenCallback)
(*updateScreenCallback)();
Ideally we want nextFrameTime_ms to be exactly equal to millis() when we calculate the time for next frame. If however it's taken longer, and now nextFrameTime_ms is less than millis(), we update the frame late, and extend that delay into the nextFrameTime_ms calculation, so a late frame makes the next frame even later, instead of trying to make up the delay. The nextFrameTime_ms calculation should take this into account.
Potentially if keeping the pacing of the GIF is important and we get behind we may want to skip frames
The text was updated successfully, but these errors were encountered:
Ideally we want
nextFrameTime_ms
to be exactly equal tomillis()
when we calculate the time for next frame. If however it's taken longer, and nownextFrameTime_ms
is less thanmillis()
, we update the frame late, and extend that delay into thenextFrameTime_ms
calculation, so a late frame makes the next frame even later, instead of trying to make up the delay. ThenextFrameTime_ms
calculation should take this into account.Potentially if keeping the pacing of the GIF is important and we get behind we may want to skip frames
The text was updated successfully, but these errors were encountered: