summaryrefslogtreecommitdiff
path: root/src/xterm.h
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-08-03 15:13:14 +0800
committerPo Lu <luangruo@yahoo.com>2022-08-03 15:14:29 +0800
commitbb3e281236bd39c2fbd0702c4f3e07dfaec7afe2 (patch)
tree4bea86b1b4ec6327085c2457e912f97282ede353 /src/xterm.h
parent99bbc1fa23c3a54f1cbd2c56c57773dd471b3ef3 (diff)
downloademacs-bb3e281236bd39c2fbd0702c4f3e07dfaec7afe2.tar.gz
emacs-bb3e281236bd39c2fbd0702c4f3e07dfaec7afe2.tar.bz2
emacs-bb3e281236bd39c2fbd0702c4f3e07dfaec7afe2.zip
Improve X server time computation
* src/xterm.c (x_sync_get_monotonic_time): Use that if available. (x_display_set_last_user_time): Compute an offset between the monotonic time and the X server time if they are not identical. * src/xterm.h (struct x_display_info): New field `server_time_offset'.
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xterm.h b/src/xterm.h
index b656c8dcb2b..fb099e92ea0 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -774,6 +774,10 @@ struct x_display_info
/* Whether or not the server time is probably the same as
"clock_gettime (CLOCK_MONOTONIC, ...)". */
bool server_time_monotonic_p;
+
+ /* The time difference between the X server clock and the monotonic
+ clock. */
+ int64_t server_time_offset;
#endif
};