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;
|
duration = nextFireDate - self.currentFireDate;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (duration == 0) {
|
if (duration <= 0) {
|
||||||
duration = kSDDisplayLinkInterval;
|
duration = kSDDisplayLinkInterval;
|
||||||
}
|
}
|
||||||
return duration;
|
return duration;
|
||||||
|
|
Loading…
Reference in New Issue