summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2001-11-19 22:06:42 (GMT)
committerKevin B Kenny <kennykb@acm.org>2001-11-19 22:06:42 (GMT)
commitecc1b3678188fcdd01a7b014420019c1a1a19935 (patch)
tree7e15fd3f7710abd63118ed42a66feef12ec470a4 /generic/tclCmdMZ.c
parent3bfeaf20080eedcc80fb76c3c10449ed366bee4d (diff)
downloadtcl-ecc1b3678188fcdd01a7b014420019c1a1a19935.zip
tcl-ecc1b3678188fcdd01a7b014420019c1a1a19935.tar.gz
tcl-ecc1b3678188fcdd01a7b014420019c1a1a19935.tar.bz2
* generic/tclCmdMZ.c (Tcl_TimeObjCmd): Corrected bug in [time]
when dealing with test sequences that run more than 2**31 microseconds. [Bug 478847]
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 426a2d5..10fd6e7 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.26.2.3 2001/10/10 15:34:25 dkf Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.26.2.4 2001/11/19 22:06:42 kennykb Exp $
*/
#include "tclInt.h"
@@ -2517,8 +2517,8 @@ Tcl_TimeObjCmd(dummy, interp, objc, objv)
}
TclpGetTime(&stop);
- totalMicroSec =
- (stop.sec - start.sec)*1000000 + (stop.usec - start.usec);
+ totalMicroSec = ( (double) ( stop.sec - start.sec ) * 1.0e6
+ + ( stop.usec - start.usec ) );
sprintf(buf, "%.0f microseconds per iteration",
((count <= 0) ? 0 : totalMicroSec/count));
Tcl_ResetResult(interp);