summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authormistachkin <mistachkin@noemail.net>2006-08-28 04:13:32 (GMT)
committermistachkin <mistachkin@noemail.net>2006-08-28 04:13:32 (GMT)
commit4c6e0a092c78078ba72e291db4622d037dd26224 (patch)
tree75a47e078869170518b2daf7e404d8fbc7f4c0cd /generic/tclClock.c
parent4f19af91e523712861f5f1067803e4ea360e1b78 (diff)
downloadtcl-4c6e0a092c78078ba72e291db4622d037dd26224.zip
tcl-4c6e0a092c78078ba72e291db4622d037dd26224.tar.gz
tcl-4c6e0a092c78078ba72e291db4622d037dd26224.tar.bz2
Fixes for [Bug 1547662] and [Bug 1547681]
FossilOrigin-Name: f0365ca34732c12f7f2e0b734f88610a4395d911
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);