Core: Fix timing until/next

This commit is contained in:
Vicki Pfau 2017-06-22 02:18:40 -07:00
parent 4efd494cd7
commit b61b8a0d2b
1 changed files with 2 additions and 2 deletions

View File

@ -89,9 +89,9 @@ int32_t mTimingNextEvent(struct mTiming* timing) {
if (!next) {
return INT_MAX;
}
return next->when - timing->masterCycles;
return next->when - timing->masterCycles - *timing->relativeCycles;
}
int32_t mTimingUntil(const struct mTiming* timing, const struct mTimingEvent* event) {
return event->when - timing->masterCycles;
return event->when - timing->masterCycles - *timing->relativeCycles;
}