Add negative duration check for unit tests
- The new`targetTimestamp` property causes the duration to be a negative value during the unit tests. Added an additional check to handle this case.
This commit is contained in:
parent
19540b3596
commit
0076d8c447
|
@ -103,7 +103,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
|||
duration = nextFireDate - self.currentFireDate;
|
||||
}
|
||||
#endif
|
||||
if (duration == 0) {
|
||||
if (duration <= 0) {
|
||||
duration = kSDDisplayLinkInterval;
|
||||
}
|
||||
return duration;
|
||||
|
|
Loading…
Reference in New Issue