diff options
| author | sebres <sebres@users.sourceforge.net> | 2019-03-05 17:34:31 (GMT) |
|---|---|---|
| committer | sebres <sebres@users.sourceforge.net> | 2019-03-05 17:34:31 (GMT) |
| commit | df27b4e4e05a39d0241a2d4bc5aa87aee5851750 (patch) | |
| tree | 619cd0773039ed7e42e7ecb6093f7bb5cc64096b /generic/tclClock.c | |
| parent | 10591b96c8e649549d81f6672d42003de5450043 (diff) | |
| parent | 78000f7f87aa86ac0fb04fbb8402c4fc2054d0fa (diff) | |
| download | tcl-df27b4e4e05a39d0241a2d4bc5aa87aee5851750.zip tcl-df27b4e4e05a39d0241a2d4bc5aa87aee5851750.tar.gz tcl-df27b4e4e05a39d0241a2d4bc5aa87aee5851750.tar.bz2 | |
merge 8.6 (TIP#527, New measurement facilities in TCL: New command timerate, performance test suite)
Diffstat (limited to 'generic/tclClock.c')
| -rw-r--r-- | generic/tclClock.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 233ddd2..aeff164 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1772,8 +1772,7 @@ ClockClicksObjCmd( #endif break; case CLICKS_MICROS: - Tcl_GetTime(&now); - clicks = ((Tcl_WideInt) now.sec * 1000000) + now.usec; + clicks = TclpGetMicroseconds(); break; } @@ -1843,15 +1842,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; } |
