diff options
author | sebres <sebres@noemail.net> | 2017-01-02 14:31:22 (GMT) |
---|---|---|
committer | sebres <sebres@noemail.net> | 2017-01-02 14:31:22 (GMT) |
commit | 98ea377780985cf422ebe8cbae5d5a526d49c324 (patch) | |
tree | a79258571d9c2ed6d2aefa903feca41f24c290df /unix/tclUnixTime.c | |
parent | 302dbed9f6278b318297ed9ff6b23a888d35ea19 (diff) | |
download | tcl-98ea377780985cf422ebe8cbae5d5a526d49c324.zip tcl-98ea377780985cf422ebe8cbae5d5a526d49c324.tar.gz tcl-98ea377780985cf422ebe8cbae5d5a526d49c324.tar.bz2 |
[win] bug fix in NativeGetTime: each call of it blurs current performance counters actualized in calibration thread in UpdateTimeEachSecond;
This entails that sometimes sporadically time-drifts resp. jump-esque time-shifts occurred, what for example produces very confusing results during time measurement.
[unix] wrong cast fixed in TclpGetWideClicks: multiplication with 1000000 in long int may cause overflow
See ticket b87ad7e9146832d505f9a430d779c5313c440256
FossilOrigin-Name: b6fc234ef3dac6df0e895e5a7b30b3785eb7f480
Diffstat (limited to 'unix/tclUnixTime.c')
-rw-r--r-- | unix/tclUnixTime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index df759d8..d634449 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -158,7 +158,7 @@ TclpGetWideClicks(void) Tcl_Time time; tclGetTimeProcPtr(&time, tclTimeClientData); - now = (Tcl_WideInt) (time.sec*1000000 + time.usec); + now = ((Tcl_WideInt)time.sec)*1000000 + time.usec; } else { #ifdef MAC_OSX_TCL now = (Tcl_WideInt) (mach_absolute_time() & INT64_MAX); |