summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-05-25 19:27:10 (GMT)
committerhobbs <hobbs>2005-05-25 19:27:10 (GMT)
commit09838bcbad38425b31bea3d9583e820118ac63a8 (patch)
tree07b506b2eb3330626197374ad5c50588b1d01d29 /generic
parent17da6ea9da2761c0e93da57cbbd779ec138e7a39 (diff)
downloadtcl-09838bcbad38425b31bea3d9583e820118ac63a8.zip
tcl-09838bcbad38425b31bea3d9583e820118ac63a8.tar.gz
tcl-09838bcbad38425b31bea3d9583e820118ac63a8.tar.bz2
* generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary cast
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCmdMZ.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 5b57b11..b507fe5 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,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.121 2005/05/23 20:18:57 das Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.122 2005/05/25 19:27:10 hobbs Exp $
*/
#include "tclInt.h"
@@ -2921,7 +2921,8 @@ Tcl_TimeObjCmd(dummy, interp, objc, objv)
totalMicroSec = ( ( (double) ( stop.sec - start.sec ) ) * 1.0e6
+ ( stop.usec - start.usec ) );
if (count <= 1) {
- objs[0] = Tcl_NewIntObj((count <= 0) ? 0 : totalMicroSec);
+ /* Use int obj since we know time is not fractional [Bug 1202178] */
+ objs[0] = Tcl_NewIntObj((count <= 0) ? 0 : (int) totalMicroSec);
} else {
objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
}