diff options
author | hobbs <hobbs> | 2005-05-25 19:27:10 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2005-05-25 19:27:10 (GMT) |
commit | 09838bcbad38425b31bea3d9583e820118ac63a8 (patch) | |
tree | 07b506b2eb3330626197374ad5c50588b1d01d29 | |
parent | 17da6ea9da2761c0e93da57cbbd779ec138e7a39 (diff) | |
download | tcl-09838bcbad38425b31bea3d9583e820118ac63a8.zip tcl-09838bcbad38425b31bea3d9583e820118ac63a8.tar.gz tcl-09838bcbad38425b31bea3d9583e820118ac63a8.tar.bz2 |
* generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary cast
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2005-05-25 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary cast + 2005-05-25 Don Porter <dgp@users.sourceforge.net> TIP#182 IMPLEMENTATION [Patch 1165062] 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); } |