comparison src/systime.h @ 5355:ad4092c38f51

(EMACS_GET_TIME) [USG5_4]: Give gettimeofday just one arg.
author Richard M. Stallman <rms@gnu.org>
date Sun, 26 Dec 1993 06:04:18 +0000
parents a9967fc643c5
children 6b5eb178d1db
comparison
equal deleted inserted replaced
5354:9bf728b3fbe5 5355:ad4092c38f51
84 #define EMACS_SECS(time) ((time).tv_sec + 0) 84 #define EMACS_SECS(time) ((time).tv_sec + 0)
85 #define EMACS_USECS(time) ((time).tv_usec + 0) 85 #define EMACS_USECS(time) ((time).tv_usec + 0)
86 #define EMACS_SET_SECS(time, seconds) ((time).tv_sec = (seconds)) 86 #define EMACS_SET_SECS(time, seconds) ((time).tv_sec = (seconds))
87 #define EMACS_SET_USECS(time, microseconds) ((time).tv_usec = (microseconds)) 87 #define EMACS_SET_USECS(time, microseconds) ((time).tv_usec = (microseconds))
88 88
89 /* On SVR4, the compiler may complain if given this extra BSD arg. */
90 #ifdef USG5_4
91 #define EMACS_GET_TIME(time) \
92 { \
93 gettimeofday (&(time)); \
94 }
95 #else /* not USG5_4 */
89 #define EMACS_GET_TIME(time) \ 96 #define EMACS_GET_TIME(time) \
90 { \ 97 { \
91 struct timezone dummy; \ 98 struct timezone dummy; \
92 gettimeofday (&(time), &dummy); \ 99 gettimeofday (&(time), &dummy); \
93 } 100 }
101 #endif /* not USG5_4 */
94 102
95 #define EMACS_ADD_TIME(dest, src1, src2) \ 103 #define EMACS_ADD_TIME(dest, src1, src2) \
96 { \ 104 { \
97 (dest).tv_sec = (src1).tv_sec + (src2).tv_sec; \ 105 (dest).tv_sec = (src1).tv_sec + (src2).tv_sec; \
98 (dest).tv_usec = (src1).tv_usec + (src2).tv_usec; \ 106 (dest).tv_usec = (src1).tv_usec + (src2).tv_usec; \