summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-06-25 18:02:12 (GMT)
committersebres <sebres@users.sourceforge.net>2019-06-25 18:02:12 (GMT)
commite113eb82e5799ffdf46e075ac6eaf0b4a950a7f3 (patch)
treee4561b7f637fb7665aef1ac30fe9af97df947ce8 /generic
parent9489b8b506999d9ec543ed3e626cb32ea3a8394a (diff)
parent334b8029eddb4e6df592c5f540ade0fd957a72c1 (diff)
downloadtcl-e113eb82e5799ffdf46e075ac6eaf0b4a950a7f3.zip
tcl-e113eb82e5799ffdf46e075ac6eaf0b4a950a7f3.tar.gz
tcl-e113eb82e5799ffdf46e075ac6eaf0b4a950a7f3.tar.bz2
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCmdMZ.c14
-rw-r--r--generic/tclInt.h7
2 files changed, 14 insertions, 7 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 06b6058..b4283d0 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -4304,14 +4304,14 @@ Tcl_TimeRateObjCmd(
register Tcl_Obj *objPtr;
register int result, i;
Tcl_Obj *calibrate = NULL, *direct = NULL;
- Tcl_WideUInt count = 0; /* Holds repetition count */
+ TclWideMUInt count = 0; /* Holds repetition count */
Tcl_WideInt maxms = WIDE_MIN;
/* Maximal running time (in milliseconds) */
- Tcl_WideUInt maxcnt = WIDE_MAX;
+ TclWideMUInt maxcnt = WIDE_MAX;
/* Maximal count of iterations. */
- Tcl_WideUInt threshold = 1; /* Current threshold for check time (faster
+ TclWideMUInt threshold = 1; /* Current threshold for check time (faster
* repeat count without time check) */
- Tcl_WideUInt maxIterTm = 1; /* Max time of some iteration as max
+ TclWideMUInt maxIterTm = 1; /* Max time of some iteration as max
* threshold, additionally avoiding divide to
* zero (i.e., never < 1) */
unsigned short factor = 50; /* Factor (4..50) limiting threshold to avoid
@@ -4686,13 +4686,13 @@ Tcl_TimeRateObjCmd(
{
Tcl_Obj *objarr[8], **objs = objarr;
- Tcl_WideUInt usec, val;
+ TclWideMUInt usec, val;
int digits;
/*
* Absolute execution time in microseconds or in wide clicks.
*/
- usec = (Tcl_WideUInt)(middle - start);
+ usec = (TclWideMUInt)(middle - start);
#ifdef TCL_WIDE_CLICKS
/*
@@ -4721,7 +4721,7 @@ Tcl_TimeRateObjCmd(
* Estimate the time of overhead (microsecs).
*/
- Tcl_WideUInt curOverhead = overhead * count;
+ TclWideMUInt curOverhead = overhead * count;
if (usec > curOverhead) {
usec -= curOverhead;
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 288176d..7b2055c 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3202,6 +3202,13 @@ MODULE_SCOPE void TclInitThreadStorage(void);
MODULE_SCOPE void TclFinalizeThreadDataThread(void);
MODULE_SCOPE void TclFinalizeThreadStorage(void);
+/* TclWideMUInt -- wide integer used for measurement calculations: */
+#if (!defined(_WIN32) || !defined(_MSC_VER) || (_MSC_VER >= 1400))
+# define TclWideMUInt Tcl_WideUInt
+#else
+/* older MSVS may not allow conversions between unsigned __int64 and double) */
+# define TclWideMUInt Tcl_WideInt
+#endif
#ifdef TCL_WIDE_CLICKS
MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks);