Lines Matching +full:1 +full:hz
17 return (2^b*n+d-1)/d;
25 v = 2^b*(d-1)/d;
30 which brings the mul value into the range 2^b-1 <= x < 2^b. Such
35 for (s = 0; 1; s++) {
37 if (m >= 2^(b-1))
43 define timeconst(hz) {
45 print "/* Time conversion constants for HZ == ", hz, " */\n"
54 print "#if HZ != ", hz, "\n"
55 print "#error \qinclude/generated/timeconst.h has the wrong HZ value!\q\n"
58 if (hz < 2) {
59 print "#error Totally bogus HZ value!\n"
61 s=fmuls(32,1000,hz)
63 print "#define HZ_TO_MSEC_MUL32\tU64_C(0x", fmul(s,1000,hz), ")\n"
64 print "#define HZ_TO_MSEC_ADJ32\tU64_C(0x", fadj(s,1000,hz), ")\n"
68 s=fmuls(32,hz,1000)
70 print "#define MSEC_TO_HZ_MUL32\tU64_C(0x", fmul(s,hz,1000), ")\n"
71 print "#define MSEC_TO_HZ_ADJ32\tU64_C(0x", fadj(s,hz,1000), ")\n"
76 cd=gcd(hz,1000)
78 print "#define HZ_TO_MSEC_DEN\t\t", hz/cd, "\n"
79 print "#define MSEC_TO_HZ_NUM\t\t", hz/cd, "\n"
83 s=fmuls(32,1000000,hz)
85 print "#define HZ_TO_USEC_MUL32\tU64_C(0x", fmul(s,1000000,hz), ")\n"
86 print "#define HZ_TO_USEC_ADJ32\tU64_C(0x", fadj(s,1000000,hz), ")\n"
90 s=fmuls(32,hz,1000000)
92 print "#define USEC_TO_HZ_MUL32\tU64_C(0x", fmul(s,hz,1000000), ")\n"
93 print "#define USEC_TO_HZ_ADJ32\tU64_C(0x", fadj(s,hz,1000000), ")\n"
98 cd=gcd(hz,1000000)
100 print "#define HZ_TO_USEC_DEN\t\t", hz/cd, "\n"
101 print "#define USEC_TO_HZ_NUM\t\t", hz/cd, "\n"
104 cd=gcd(hz,1000000000)
106 print "#define HZ_TO_NSEC_DEN\t\t", hz/cd, "\n"
107 print "#define NSEC_TO_HZ_NUM\t\t", hz/cd, "\n"
116 hz = read();
117 timeconst(hz)