diff options
author | Po Lu <luangruo@yahoo.com> | 2022-08-03 15:13:14 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-08-03 15:14:29 +0800 |
commit | bb3e281236bd39c2fbd0702c4f3e07dfaec7afe2 (patch) | |
tree | 4bea86b1b4ec6327085c2457e912f97282ede353 /src/xterm.h | |
parent | 99bbc1fa23c3a54f1cbd2c56c57773dd471b3ef3 (diff) | |
download | emacs-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.h | 4 |
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 }; |