summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-05-25 19:25:55 (GMT)
committerhobbs <hobbs>2005-05-25 19:25:55 (GMT)
commita4cdc865d7714654fd17a2e9ebb03a26826daecc (patch)
treee8912d883300dab0b861e60824996d518cd9a5a1 /generic
parenta037b38a4b352395866f07d29197d83129a22526 (diff)
downloadtcl-a4cdc865d7714654fd17a2e9ebb03a26826daecc.zip
tcl-a4cdc865d7714654fd17a2e9ebb03a26826daecc.tar.gz
tcl-a4cdc865d7714654fd17a2e9ebb03a26826daecc.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 d26f33c..0c9ff94 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -14,7 +14,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.82.2.18 2005/05/24 04:18:54 das Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.82.2.19 2005/05/25 19:25:57 hobbs Exp $
*/
#include "tclInt.h"
@@ -2944,7 +2944,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);
}