diff options
Diffstat (limited to 'mit-pthreads/machdep/irix-5.2/timers.h')
-rwxr-xr-x | mit-pthreads/machdep/irix-5.2/timers.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mit-pthreads/machdep/irix-5.2/timers.h b/mit-pthreads/machdep/irix-5.2/timers.h new file mode 100755 index 00000000000..ffa24dc9a15 --- /dev/null +++ b/mit-pthreads/machdep/irix-5.2/timers.h @@ -0,0 +1,18 @@ +#ifndef __SYS_TIMERS_H__ +#define __SYS_TIMERS_H__ + +struct timespec { + time_t tv_sec; + long tv_nsec; +}; + +#define TIMEVAL_TO_TIMESPEC(tv, ts) { \ + (ts)->tv_sec = (tv)->tv_sec; \ + (ts)->tv_nsec = (tv)->tv_usec * 1000; \ +} +#define TIMESPEC_TO_TIMEVAL(tv, ts) { \ + (tv)->tv_sec = (ts)->tv_sec; \ + (tv)->tv_usec = (ts)->tv_nsec / 1000; \ +} + +#endif /* !__SYS_TIMERS_H__ */ |