Mercurial > emacs
comparison src/xterm.c @ 5354:9bf728b3fbe5
(XTflash): Use EMACS_GET_TIME.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 26 Dec 1993 06:00:04 +0000 |
parents | c094c1df2e87 |
children | b36dfc938ba4 |
comparison
equal
deleted
inserted
replaced
5353:6389ed5b45ac | 5354:9bf728b3fbe5 |
---|---|
869 XFlush (x_current_display); | 869 XFlush (x_current_display); |
870 | 870 |
871 { | 871 { |
872 struct timeval wakeup, now; | 872 struct timeval wakeup, now; |
873 | 873 |
874 gettimeofday (&wakeup, (struct timezone *) 0); | 874 EMACS_GET_TIME (&wakeup); |
875 | 875 |
876 /* Compute time to wait until, propagating carry from usecs. */ | 876 /* Compute time to wait until, propagating carry from usecs. */ |
877 wakeup.tv_usec += 150000; | 877 wakeup.tv_usec += 150000; |
878 wakeup.tv_sec += (wakeup.tv_usec / 1000000); | 878 wakeup.tv_sec += (wakeup.tv_usec / 1000000); |
879 wakeup.tv_usec %= 1000000; | 879 wakeup.tv_usec %= 1000000; |
881 /* Keep waiting until past the time wakeup. */ | 881 /* Keep waiting until past the time wakeup. */ |
882 while (1) | 882 while (1) |
883 { | 883 { |
884 struct timeval timeout; | 884 struct timeval timeout; |
885 | 885 |
886 gettimeofday (&timeout, (struct timezone *)0); | 886 EMACS_GET_TIME (&timeout); |
887 | 887 |
888 /* In effect, timeout = wakeup - timeout. | 888 /* In effect, timeout = wakeup - timeout. |
889 Break if result would be negative. */ | 889 Break if result would be negative. */ |
890 if (timeval_subtract (&timeout, wakeup, timeout)) | 890 if (timeval_subtract (&timeout, wakeup, timeout)) |
891 break; | 891 break; |