diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-06-02 08:12:38 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-06-02 08:12:38 (GMT) |
commit | f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5 (patch) | |
tree | 1601cdbe0f43c015bfcb743565108c36f488e67b /unix/tclUnixTime.c | |
parent | 1a543aa367940f7b7f4f8c6a8e83f673e2715611 (diff) | |
parent | 3ae95af52ca24414d723b827fc99cc1a2b94f778 (diff) | |
download | tcl-f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5.zip tcl-f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5.tar.gz tcl-f00c9c9e4aa0c923528903a88e4bf2ef9aa6c2d5.tar.bz2 |
Merge core-8-6-branch. This removes the work currently being done in "sebres-8-6-clock-speedup-cr1" branch, but that will be merged again as soon as the work is done.
All other changes in "trunk" since then (e.g. the INST_STR_CONCAT1 performance improvement, and the removal of SunOS-4) are retained.
Diffstat (limited to 'unix/tclUnixTime.c')
-rw-r--r-- | unix/tclUnixTime.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 1d8b351..6a73ac2 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -87,32 +87,6 @@ TclpGetSeconds(void) /* *---------------------------------------------------------------------- * - * TclpGetMicroseconds -- - * - * This procedure returns the number of microseconds from the epoch. - * On most Unix systems the epoch is Midnight Jan 1, 1970 GMT. - * - * Results: - * Number of microseconds from the epoch. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -Tcl_WideInt -TclpGetMicroseconds(void) -{ - Tcl_Time time; - - tclGetTimeProcPtr(&time, tclTimeClientData); - return ((Tcl_WideInt)time.sec)*1000000 + time.usec; -} - -/* - *---------------------------------------------------------------------- - * * TclpGetClicks -- * * This procedure returns a value that represents the highest resolution @@ -245,51 +219,6 @@ TclpWideClicksToNanoseconds( return nsec; } - -/* - *---------------------------------------------------------------------- - * - * TclpWideClickInMicrosec -- - * - * This procedure return scale to convert click values from the - * TclpGetWideClicks native resolution to microsecond resolution - * and back. - * - * Results: - * 1 click in microseconds as double. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -double -TclpWideClickInMicrosec(void) -{ - if (tclGetTimeProcPtr != NativeGetTime) { - return 1.0; - } else { -#ifdef MAC_OSX_TCL - static int initialized = 0; - static double scale = 0.0; - - if (initialized) { - return scale; - } else { - mach_timebase_info_data_t tb; - - mach_timebase_info(&tb); - /* value of tb.numer / tb.denom = 1 click in nanoseconds */ - scale = ((double)tb.numer) / tb.denom / 1000; - initialized = 1; - return scale; - } -#else -#error Wide high-resolution clicks not implemented on this platform -#endif - } -} #endif /* TCL_WIDE_CLICKS */ /* |