summaryrefslogtreecommitdiffstats
path: root/generic/tkBind.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-10-11 14:27:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-10-11 14:27:09 (GMT)
commit5e9592bc08da2424a5b180e1ee18f0ba564c672f (patch)
treec325f97dcb56ac7472e6d2a4b67c1f0b67433d5f /generic/tkBind.c
parentf37694250c1164741ebb0085811291ffb0f11e51 (diff)
downloadtk-5e9592bc08da2424a5b180e1ee18f0ba564c672f.zip
tk-5e9592bc08da2424a5b180e1ee18f0ba564c672f.tar.gz
tk-5e9592bc08da2424a5b180e1ee18f0ba564c672f.tar.bz2
Backout [https://core.tcl-lang.org/tk/info/6ffcea9b093deb5a|6ffcea9b09]: Better solution built into Tcl (Win64 only) now.
Diffstat (limited to 'generic/tkBind.c')
-rw-r--r--generic/tkBind.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index e4e2b99..7873d29 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -792,22 +792,10 @@ GetButtonNumber(
static Time
CurrentTimeInMilliSecs(void)
{
- union {
- Tcl_Time now;
- struct {
- Tcl_WideInt sec; /* reserve stack space enough for 64-bit fields */
- Tcl_WideInt usec;
- } lnow;
- } t;
- t.lnow.usec = -1; /* Invalid usec value, so we can see if Tcl_GetTime overwrites it */
- Tcl_GetTime(&t.now);
-#ifdef _WIN64
- if (t.lnow.usec != -1) {
- /* Win64 Tk loaded in Cygwin-64: Tcl_GetTime() returns 64-bit fields */
- return ((Time) t.lnow.sec)*1000 + ((Time) t.lnow.usec)/1000;
- }
-#endif
- return ((Time) t.now.sec)*1000 + ((Time) t.now.usec)/1000;
+ Tcl_Time now;
+
+ Tcl_GetTime(&now);
+ return ((Time) now.sec)*1000 + ((Time) now.usec)/1000;
}
static Info