diff options
author | sebres <sebres@users.sourceforge.net> | 2017-07-03 13:29:50 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-07-03 13:29:50 (GMT) |
commit | 345ea34a7e160b62787cd3397d80dce03a4d1ee6 (patch) | |
tree | 5072425b2285daf27f7eca35ea92239e7ae3b4ea /generic/tclInterp.c | |
parent | 62e00681cf398709d6a32eaa1ae0ccae3a5da9ef (diff) | |
download | tcl-345ea34a7e160b62787cd3397d80dce03a4d1ee6.zip tcl-345ea34a7e160b62787cd3397d80dce03a4d1ee6.tar.gz tcl-345ea34a7e160b62787cd3397d80dce03a4d1ee6.tar.bz2 |
interim commit: trying to resolve time-freezes with new facilities timeJump/timeJumpEpoch
Diffstat (limited to 'generic/tclInterp.c')
-rw-r--r-- | generic/tclInterp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c index b461f40..03a9fe2 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -3718,19 +3718,14 @@ Tcl_LimitSetTime( Tcl_Time *timeLimitPtr) { Interp *iPtr = (Interp *) interp; - Tcl_Time nextMoment; + Tcl_WideInt nextMoment; memcpy(&iPtr->limit.time, timeLimitPtr, sizeof(Tcl_Time)); if (iPtr->limit.timeEvent != NULL) { TclDeleteTimerEntry(iPtr->limit.timeEvent); } - nextMoment.sec = timeLimitPtr->sec; - nextMoment.usec = timeLimitPtr->usec+10; - if (nextMoment.usec >= 1000000) { - nextMoment.sec++; - nextMoment.usec -= 1000000; - } - iPtr->limit.timeEvent = TclCreateTimerHandlerEx(&nextMoment, + nextMoment = TCL_TIME_TO_USEC(*timeLimitPtr) + 10; + iPtr->limit.timeEvent = TclpCreateTimerHandlerEx(nextMoment, TimeLimitCallback, TimeLimitDeleteCallback, 0, TCL_ABSTMR_EVENT); iPtr->limit.timeEvent->clientData = interp; iPtr->limit.exceeded &= ~TCL_LIMIT_TIME; |