summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2006-08-28 04:13:32 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2006-08-28 04:13:32 (GMT)
commit1f7a4c65f4cdd102ebde7c2058fff469686829f8 (patch)
tree75a47e078869170518b2daf7e404d8fbc7f4c0cd /generic/tclClock.c
parent8d05e9798827f58abf7ac5d5d28d2b03ede92daa (diff)
downloadtcl-1f7a4c65f4cdd102ebde7c2058fff469686829f8.zip
tcl-1f7a4c65f4cdd102ebde7c2058fff469686829f8.tar.gz
tcl-1f7a4c65f4cdd102ebde7c2058fff469686829f8.tar.bz2
Fixes for [Bug 1547662] and [Bug 1547681]
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 35bae5b..fb5c144 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclClock.c,v 1.57 2006/08/21 01:08:41 das Exp $
+ * RCS: @(#) $Id: tclClock.c,v 1.58 2006/08/28 04:13:32 mistachkin Exp $
*/
#include "tclInt.h"
@@ -1666,6 +1666,11 @@ ClockClicksObjCmd(
};
int index = CLICKS_NATIVE;
Tcl_Time now;
+#ifndef TCL_WIDE_CLICKS
+ unsigned long clicks;
+#else
+ Tcl_WideInt clicks;
+#endif
switch (objc) {
case 1:
@@ -1688,13 +1693,13 @@ ClockClicksObjCmd(
now.sec * 1000 + now.usec / 1000 ) );
break;
case CLICKS_NATIVE:
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj( (Tcl_WideInt)
#ifndef TCL_WIDE_CLICKS
- TclpGetClicks()
+ clicks = TclpGetClicks();
#else
- TclpGetWideClicks()
+ clicks = TclpGetWideClicks();
#endif
- ));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj( (Tcl_WideInt)
+ clicks ) );
break;
case CLICKS_MICROS:
Tcl_GetTime(&now);