summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2017-01-02 14:31:22 (GMT)
committersebres <sebres@users.sourceforge.net>2017-01-02 14:31:22 (GMT)
commitb901129d9617508943f0a9e70ae6de14b10c8fec (patch)
tree8dd5d50d589afd40c0d90b93df4dae5c46d09ab0 /unix
parentbe0289c6ab1c90cdc651dd4219d6566e68ff5d3e (diff)
downloadtcl-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.c2
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);