Changeset 1975
- Timestamp:
- 04/12/08 22:40:06 (7 months ago)
- Files:
-
- 1 modified
-
features/performance/src/defines.h.in (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
features/performance/src/defines.h.in
r1974 r1975 219 219 #define MILLISEC_TO_TIMEVAL(x, tv) \ 220 220 do { \ 221 (tv)->tv_sec = (x) / 1000; \221 (tv)->tv_sec = (x) / 1000; \ 222 222 (tv)->tv_usec = (x * 1000) - ((tv)->tv_sec * 1000000); \ 223 223 } while(0) … … 225 225 #define MICROSEC_TO_TIMEVAL(x, tv) \ 226 226 do { \ 227 (tv)->tv_sec = (x) / 1000000; \227 (tv)->tv_sec = (x) / 1000000; \ 228 228 (tv)->tv_usec = (x) - ((tv)->tv_sec * 1000000); \ 229 229 } while(0) 230 /* 230 231 231 #define NANOSEC_TO_TIMEVAL(x, tv) \ 232 232 do { \ 233 (tv)->tv_sec = (x) / 1000000000;\234 (tv)->tv_usec = ( x / 1000) - (tv)->tv_sec * 1000000); \233 (tv)->tv_sec = (x) / 1000000000; \ 234 (tv)->tv_usec = ((x) % 1000000000) / 1000); \ 235 235 } while(0) 236 236 237 237 #define NANOSEC_TO_TIMESPEC(x, ts) \ 238 238 do { \ 239 (ts)->tv_sec = (x) / 1000000000; \ 240 (ts)->tv_nsec = (x) - ((ts)->tv_sec * 1000000000); \ 241 } while(0) 242 */ 243 #define NANOSEC_TO_TIMEVAL(x, tv) \ 244 do { \ 245 (tv)->tv_sec = (x) / 1000000000; \ 246 (tv)->tv_usec = ((x) % 1000000000) / 1000); \ 247 } while(0) 248 249 #define NANOSEC_TO_TIMESPEC(x, ts) \ 250 do { \ 251 (ts)->tv_sec = (x) / 1000000000; \ 239 (ts)->tv_sec = (x) / 1000000000; \ 252 240 (ts)->tv_nsec = (x) % 1000000000; \ 253 241 } while(0) … … 257 245 #define TIMESPEC_TO_NANOSEC(x) ((u_int64_t)((x)->tv_sec * 1000000000) + ((u_int64_t)(x)->tv_nsec)) 258 246 259 260 261 247 #endif /* DEFINES */
