diff options
author | sebres <sebres@users.sourceforge.net> | 2017-02-07 19:35:51 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-02-07 19:35:51 (GMT) |
commit | b9a4ebb568a0433ab24abb6ea609d4bda6fd337a (patch) | |
tree | 06b630ddf43d66e47fe562708da6a4cce980ec67 /generic/tclInt.h | |
parent | de7fe4dd0fea3795e66e91109721ce68c5d7005b (diff) | |
download | tcl-mistake.zip tcl-mistake.tar.gz tcl-mistake.tar.bz2 |
[timerate] bug fix: missing scale conversion by Mac OSX on platform where high resolution clicks are not microseconds based;mistake
[win] use high resolution timer for the wide clicks and microseconds directly, prevent several forwards/backwards conversions;
[win, unix, mac-osx] normalize some functions for common usage in different time units (clicks, micro- and nanoseconds)
# Conflicts:
# win/tclWinTime.c
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 1b37d84..387bd5e 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3189,7 +3189,23 @@ MODULE_SCOPE void TclFinalizeThreadStorage(void); #ifdef TCL_WIDE_CLICKS MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void); MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks); +MODULE_SCOPE double TclpWideClickInMicrosec(void); +#else +# ifdef _WIN32 +# define TCL_WIDE_CLICKS 1 +MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void); +# define TclpWideClicksToNanoseconds(clicks) \ + ((double)clicks / 1000) +# define TclpWideClickInMicrosec() (1) +# endif #endif +#ifndef _WIN32 +MODULE_SCOPE Tcl_WideInt TclpGetMicroseconds(void); +#else +# define TclpGetMicroseconds() \ + TclpGetWideClicks() +#endif + MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp); MODULE_SCOPE void * TclpThreadCreateKey(void); MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr); |