diff options
author | sebres <sebres@users.sourceforge.net> | 2017-05-16 12:41:01 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-05-16 12:41:01 (GMT) |
commit | 658198240aecba2e0bbee884e21f0cb0c3f732d5 (patch) | |
tree | 4f6d780f650cba9a388f875c2f93cb08a57c53b1 /generic/tclClock.c | |
parent | ab808831bd7d76198dfc874049b9fd00b009646e (diff) | |
parent | 4a5d28ee4e72a4e58dc65546f814c1cd71f3accc (diff) | |
download | tcl-658198240aecba2e0bbee884e21f0cb0c3f732d5.zip tcl-658198240aecba2e0bbee884e21f0cb0c3f732d5.tar.gz tcl-658198240aecba2e0bbee884e21f0cb0c3f732d5.tar.bz2 |
back-ported branch sebres-8-6-timerate (new command "timerate" for 8.5)
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r-- | generic/tclClock.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 782c681..b019ef9 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1739,9 +1739,7 @@ ClockClicksObjCmd( break; } case CLICKS_MICROS: - Tcl_GetTime(&now); - Tcl_SetObjResult(interp, Tcl_NewWideIntObj( - ((Tcl_WideInt) now.sec * 1000000) + now.usec)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(TclpGetMicroseconds())); break; } @@ -1810,15 +1808,11 @@ ClockMicrosecondsObjCmd( int objc, /* Parameter count */ Tcl_Obj* const* objv) /* Parameter values */ { - Tcl_Time now; - if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; } - Tcl_GetTime(&now); - Tcl_SetObjResult(interp, Tcl_NewWideIntObj( - ((Tcl_WideInt) now.sec * 1000000) + now.usec)); + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(TclpGetMicroseconds())); return TCL_OK; } |