]>
git.proxmox.com Git - mirror_spl.git/blob - include/linux-time.h
4 #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.16 */
7 * Structure returned by gettimeofday(2) system call,
8 * and used in other calls.
15 #include <linux/time.h>
16 #include <sys/linux-types.h>
18 extern unsigned long long monotonic_clock(void);
19 typedef struct timespec timestruc_t
; /* definition per SVr4 */
20 typedef longlong_t hrtime_t
;
22 #define TIME32_MAX INT32_MAX
23 #define TIME32_MIN INT32_MIN
27 #define MICROSEC 1000000
28 #define NANOSEC 1000000000
32 BUG_ON(HZ < 100 || HZ > MICROSEC); \
36 #define gethrestime(ts) getnstimeofday((ts))
38 static __inline__ hrtime_t
40 /* BUG_ON(cur_timer == timer_none); */
42 /* Solaris expects a long long here but monotonic_clock() returns an
43 * unsigned long long. Note that monotonic_clock() returns the number
44 * of nanoseconds passed since kernel initialization. Even for a signed
45 * long long this will not "go negative" for ~292 years.
47 return monotonic_clock();
50 static __inline__
time_t
64 #endif /* _SYS_TIME_H */