From 93da5a0578e7f16ea846eb257f36a24e316ef8d4 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 8 Jul 2018 15:15:15 +1000 Subject: gDelayNone/gDelayForever to replace TIME_IMMEDIATE/TIME_INFINITE --- src/gtimer/gtimer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gtimer/gtimer.c') diff --git a/src/gtimer/gtimer.c b/src/gtimer/gtimer.c index 93e93b6f..6dc0d6f8 100644 --- a/src/gtimer/gtimer.c +++ b/src/gtimer/gtimer.c @@ -38,7 +38,7 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) { void *param; (void) arg; - nxtTimeout = TIME_INFINITE; + nxtTimeout = gDelayForever; lastTime = 0; while(1) { /* Wait for work to do. */ @@ -49,7 +49,7 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) { // Our reference time tm = gfxSystemTicks(); - nxtTimeout = TIME_INFINITE; + nxtTimeout = gDelayForever; /* We need to obtain the mutex */ gfxMutexEnter(&mutex); @@ -61,7 +61,7 @@ static DECLARE_THREAD_FUNCTION(GTimerThreadHandler, arg) { if ((pt->flags & GTIMER_FLG_JABBED) || (!(pt->flags & GTIMER_FLG_INFINITE) && TimeIsWithin(pt->when, lastTime, tm))) { // Is this timer periodic? - if ((pt->flags & GTIMER_FLG_PERIODIC) && pt->period != TIME_IMMEDIATE) { + if ((pt->flags & GTIMER_FLG_PERIODIC) && pt->period != gDelayNone) { // Yes - Update ready for the next period if (!(pt->flags & GTIMER_FLG_INFINITE)) { // We may have skipped a period. @@ -164,9 +164,9 @@ void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, gBool periodic, gDe pt->flags = GTIMER_FLG_SCHEDULED; if (periodic) pt->flags |= GTIMER_FLG_PERIODIC; - if (millisec == TIME_INFINITE) { + if (millisec == gDelayForever) { pt->flags |= GTIMER_FLG_INFINITE; - pt->period = TIME_INFINITE; + pt->period = gDelayForever; } else { pt->period = gfxMillisecondsToTicks(millisec); pt->when = gfxSystemTicks() + pt->period; -- cgit v1.2.3