diff options
author | sebres <sebres@users.sourceforge.net> | 2017-01-02 14:31:22 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-01-02 14:31:22 (GMT) |
commit | b901129d9617508943f0a9e70ae6de14b10c8fec (patch) | |
tree | 8dd5d50d589afd40c0d90b93df4dae5c46d09ab0 /unix | |
parent | be0289c6ab1c90cdc651dd4219d6566e68ff5d3e (diff) | |
download | tcl-b901129d9617508943f0a9e70ae6de14b10c8fec.zip tcl-b901129d9617508943f0a9e70ae6de14b10c8fec.tar.gz tcl-b901129d9617508943f0a9e70ae6de14b10c8fec.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
Diffstat (limited to 'unix')
-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); |