diff options
author | dgp <dgp@users.sourceforge.net> | 2019-05-03 20:24:30 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2019-05-03 20:24:30 (GMT) |
commit | 50146fa5d80ed376146b7f9b2ad6012b04d9a760 (patch) | |
tree | af95e2db46d2e2a3d2263c773954e618f60ad451 /generic/tclTimer.c | |
parent | 065f14aeb7e6293763124f655ee7e8a5aa7fb925 (diff) | |
parent | a35dd1803660e9f68391c597e20b3c0f72e320ad (diff) | |
download | tcl-50146fa5d80ed376146b7f9b2ad6012b04d9a760.zip tcl-50146fa5d80ed376146b7f9b2ad6012b04d9a760.tar.gz tcl-50146fa5d80ed376146b7f9b2ad6012b04d9a760.tar.bz2 |
merge 8.7
Diffstat (limited to 'generic/tclTimer.c')
-rw-r--r-- | generic/tclTimer.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 0833722..c89318f 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -310,8 +310,8 @@ TclCreateAbsoluteTimerHandler( timerHandlerPtr->token = (Tcl_TimerToken) INT2PTR(tsdPtr->lastTimerId); /* - * Add the event to the queue in the correct position - * (ordered by event firing time). + * Add the event to the queue in the correct position (ordered by event + * firing time). */ for (tPtr2 = tsdPtr->firstTimerHandlerPtr, prevPtr = NULL; tPtr2 != NULL; @@ -1013,8 +1013,8 @@ AfterDelay( Tcl_GetTime(&now); endTime = now; - endTime.sec += (long)(ms/1000); - endTime.usec += ((int)(ms%1000))*1000; + endTime.sec += (long)(ms / 1000); + endTime.usec += ((int)(ms % 1000)) * 1000; if (endTime.usec >= 1000000) { endTime.sec++; endTime.usec -= 1000000; @@ -1042,17 +1042,17 @@ AfterDelay( if (diff > TCL_TIME_MAXIMUM_SLICE) { diff = TCL_TIME_MAXIMUM_SLICE; } - if (diff == 0 && TCL_TIME_BEFORE(now, endTime)) { - diff = 1; - } + if (diff == 0 && TCL_TIME_BEFORE(now, endTime)) { + diff = 1; + } if (diff > 0) { - Tcl_Sleep((int) diff); - if (diff < SLEEP_OFFLOAD_GETTIMEOFDAY) { - break; - } + Tcl_Sleep((long) diff); + if (diff < SLEEP_OFFLOAD_GETTIMEOFDAY) { + break; + } } else { - break; - } + break; + } } else { diff = TCL_TIME_DIFF_MS(iPtr->limit.time, now); if (diff > TCL_TIME_MAXIMUM_SLICE) { |