Go to the documentation of this file. 1 #ifndef _ASM_GENERIC_CPUTIME_H
2 #define _ASM_GENERIC_CPUTIME_H
4 #include <linux/time.h>
9 #define cputime_one_jiffy jiffies_to_cputime(1)
10 #define cputime_to_jiffies(__ct) (__force unsigned long)(__ct)
11 #define cputime_to_scaled(__ct) (__ct)
12 #define jiffies_to_cputime(__hz) (__force cputime_t)(__hz)
16 #define cputime64_to_jiffies64(__ct) (__force u64)(__ct)
17 #define jiffies64_to_cputime64(__jif) (__force cputime64_t)(__jif)
19 #define nsecs_to_cputime64(__ct) \
20 jiffies64_to_cputime64(nsecs_to_jiffies64(__ct))
26 #define cputime_to_usecs(__ct) \
27 jiffies_to_usecs(cputime_to_jiffies(__ct))
28 #define usecs_to_cputime(__usec) \
29 jiffies_to_cputime(usecs_to_jiffies(__usec))
30 #define usecs_to_cputime64(__usec) \
31 jiffies64_to_cputime64(nsecs_to_jiffies64((__usec) * 1000))
36 #define cputime_to_secs(jif) (cputime_to_jiffies(jif) / HZ)
37 #define secs_to_cputime(sec) jiffies_to_cputime((sec) * HZ)
42 #define timespec_to_cputime(__val) \
43 jiffies_to_cputime(timespec_to_jiffies(__val))
44 #define cputime_to_timespec(__ct,__val) \
45 jiffies_to_timespec(cputime_to_jiffies(__ct),__val)
50 #define timeval_to_cputime(__val) \
51 jiffies_to_cputime(timeval_to_jiffies(__val))
52 #define cputime_to_timeval(__ct,__val) \
53 jiffies_to_timeval(cputime_to_jiffies(__ct),__val)
58 #define cputime_to_clock_t(__ct) \
59 jiffies_to_clock_t(cputime_to_jiffies(__ct))
60 #define clock_t_to_cputime(__x) \
61 jiffies_to_cputime(clock_t_to_jiffies(__x))
66 #define cputime64_to_clock_t(__ct) \
67 jiffies_64_to_clock_t(cputime64_to_jiffies64(__ct))