Core: Remove unnecessary pointer operation in timing

This commit is contained in:
Jeffrey Pfau 2016-10-30 17:50:19 -07:00
parent 2a0c53441a
commit 2c2a7ca436
1 changed files with 2 additions and 1 deletions

View File

@ -55,9 +55,10 @@ void mTimingDeschedule(struct mTiming* timing, struct mTimingEvent* event) {
void mTimingTick(struct mTiming* timing, int32_t cycles) {
timing->masterCycles += cycles;
uint32_t masterCycles = timing->masterCycles;
while (mTimingEventListSize(&timing->events)) {
struct mTimingEvent* next = *mTimingEventListGetPointer(&timing->events, 0);
int32_t nextWhen = next->when - timing->masterCycles;
int32_t nextWhen = next->when - masterCycles;
if (nextWhen > 0) {
*timing->nextEvent = nextWhen;
return;