comparison src/systime.h @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 677f6a0ee643
children fbbf69b4e8a7
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
139 #define EMACS_SET_SECS(time, seconds) ((time).tv_sec = (seconds)) 139 #define EMACS_SET_SECS(time, seconds) ((time).tv_sec = (seconds))
140 #define EMACS_SET_USECS(time, microseconds) ((time).tv_usec = (microseconds)) 140 #define EMACS_SET_USECS(time, microseconds) ((time).tv_usec = (microseconds))
141 141
142 #if !defined (HAVE_GETTIMEOFDAY) 142 #if !defined (HAVE_GETTIMEOFDAY)
143 struct timezone; 143 struct timezone;
144 extern int gettimeofday (struct timeval *, struct timezone *); 144 int gettimeofday (struct timeval *, struct timezone *);
145 #endif 145 #endif
146 146
147 /* On SVR4, the compiler may complain if given this extra BSD arg. */ 147 /* On SVR4, the compiler may complain if given this extra BSD arg. */
148 #ifdef GETTIMEOFDAY_ONE_ARGUMENT 148 #ifdef GETTIMEOFDAY_ONE_ARGUMENT
149 # ifdef SOLARIS2 149 # ifdef SOLARIS2
150 /* Solaris (at least) omits this prototype. IRIX5 has it and chokes if we 150 /* Solaris (at least) omits this prototype. IRIX5 has it and chokes if we
151 declare it here. */ 151 declare it here. */
152 extern int gettimeofday (struct timeval *); 152 int gettimeofday (struct timeval *);
153 # endif 153 # endif
154 /* According to the Xt sources, some NTP daemons on some systems may 154 /* According to the Xt sources, some NTP daemons on some systems may
155 return non-normalized values. */ 155 return non-normalized values. */
156 #define EMACS_GET_TIME(time) \ 156 #define EMACS_GET_TIME(time) \
157 do { \ 157 do { \
160 } while (0) 160 } while (0)
161 #else /* not GETTIMEOFDAY_ONE_ARGUMENT */ 161 #else /* not GETTIMEOFDAY_ONE_ARGUMENT */
162 # ifdef SOLARIS2 162 # ifdef SOLARIS2
163 /* Solaris doesn't provide any prototype of this unless a bunch of 163 /* Solaris doesn't provide any prototype of this unless a bunch of
164 crap we don't define are defined. */ 164 crap we don't define are defined. */
165 extern int gettimeofday (struct timeval *, void *dummy); 165 int gettimeofday (struct timeval *, void *dummy);
166 # endif 166 # endif
167 #define EMACS_GET_TIME(time) \ 167 #define EMACS_GET_TIME(time) \
168 do { \ 168 do { \
169 struct timezone dummy; \ 169 struct timezone dummy; \
170 gettimeofday (&(time), &dummy); \ 170 gettimeofday (&(time), &dummy); \
217 (time1).tv_usec >= (time2).tv_usec)) 217 (time1).tv_usec >= (time2).tv_usec))
218 218
219 #define EMACS_SET_SECS_USECS(time, secs, usecs) \ 219 #define EMACS_SET_SECS_USECS(time, secs, usecs) \
220 (EMACS_SET_SECS (time, secs), EMACS_SET_USECS (time, usecs)) 220 (EMACS_SET_SECS (time, secs), EMACS_SET_USECS (time, usecs))
221 221
222 extern int set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime); 222 int set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime);
223 223
224 extern void get_process_times (double *user_time, double *system_time, 224 void get_process_times (double *user_time, double *system_time,
225 double *real_time); 225 double *real_time);
226 226
227 #if defined(WINDOWSNT) || defined(BROKEN_CYGWIN) 227 #if defined(WINDOWSNT) || defined(BROKEN_CYGWIN)
228 228
229 /* setitimer emulation for Win32 (see nt.c) */ 229 /* setitimer emulation for Win32 (see nt.c) */
230 230