diff options
author | hobbs <hobbs> | 2001-11-21 02:36:18 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-11-21 02:36:18 (GMT) |
commit | cff9c3309b2e3c096c301a94bff0d9804be13520 (patch) | |
tree | d6c9734d5b8944f4d96bc77057fc560b661f57c4 /generic/tclCmdMZ.c | |
parent | f59ffab94e11d0dc9efd7189ec5c64e904cdfedd (diff) | |
download | tcl-cff9c3309b2e3c096c301a94bff0d9804be13520.zip tcl-cff9c3309b2e3c096c301a94bff0d9804be13520.tar.gz tcl-cff9c3309b2e3c096c301a94bff0d9804be13520.tar.bz2 |
added TIP#73 patch #483500 from Kevin Kenny.
This deprecates TclpGetTime in favor of new Tcl_GetTime.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 836c080..34af105 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.49 2001/11/19 14:35:54 dkf Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.50 2001/11/21 02:36:20 hobbs Exp $ */ #include "tclInt.h" @@ -2673,17 +2673,17 @@ Tcl_TimeObjCmd(dummy, interp, objc, objv) objPtr = objv[1]; i = count; - TclpGetTime(&start); + Tcl_GetTime(&start); while (i-- > 0) { result = Tcl_EvalObjEx(interp, objPtr, 0); if (result != TCL_OK) { return result; } } - TclpGetTime(&stop); + Tcl_GetTime(&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); |