diff options
author | sebres <sebres@users.sourceforge.net> | 2019-03-05 18:23:26 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-03-05 18:23:26 (GMT) |
commit | f456cd9b3e6743bf15cd756bfc116153fa95605c (patch) | |
tree | 85e4e3121d93802d9d5df50157ead27f68ff7a43 /generic/tclClock.c | |
parent | 8c315fd31ff823b217374dd32577e04c42674249 (diff) | |
parent | b930511d5b774c13f2cd22d7820ad0acf7069c39 (diff) | |
download | tcl-f456cd9b3e6743bf15cd756bfc116153fa95605c.zip tcl-f456cd9b3e6743bf15cd756bfc116153fa95605c.tar.gz tcl-f456cd9b3e6743bf15cd756bfc116153fa95605c.tar.bz2 |
merge 8.7 (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 634ab1b..c5677a5 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; } |