diff options
| author | sebres <sebres@users.sourceforge.net> | 2019-03-05 16:25:17 (GMT) |
|---|---|---|
| committer | sebres <sebres@users.sourceforge.net> | 2019-03-05 16:25:17 (GMT) |
| commit | bc27eb24301d103830c029cb4260e0338177e331 (patch) | |
| tree | 65e4c8ff44f60a54faf85fd5dc1940e88724a826 /generic/tclClock.c | |
| parent | 809bbc79fb31d2381e7ec0f4c35fca0fe3db8998 (diff) | |
| parent | 2e2fdf481a1adc01e01df1b72add387325868bfd (diff) | |
| download | tcl-bc27eb24301d103830c029cb4260e0338177e331.zip tcl-bc27eb24301d103830c029cb4260e0338177e331.tar.gz tcl-bc27eb24301d103830c029cb4260e0338177e331.tar.bz2 | |
merge sebres-8-5-timerate (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 | 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; } |
