diff options
| author | Po Lu | 2022-08-03 15:13:14 +0800 |
|---|---|---|
| committer | Po Lu | 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.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 | |||
| 774 | /* Whether or not the server time is probably the same as | 774 | /* Whether or not the server time is probably the same as |
| 775 | "clock_gettime (CLOCK_MONOTONIC, ...)". */ | 775 | "clock_gettime (CLOCK_MONOTONIC, ...)". */ |
| 776 | bool server_time_monotonic_p; | 776 | bool server_time_monotonic_p; |
| 777 | |||
| 778 | /* The time difference between the X server clock and the monotonic | ||
| 779 | clock. */ | ||
| 780 | int64_t server_time_offset; | ||
| 777 | #endif | 781 | #endif |
| 778 | }; | 782 | }; |
| 779 | 783 | ||