Lines Matching defs:hz
24 static inline uint64_t freq_cycles_and_hz_to_ns(uint64_t ncycles, freq_t hz)
26 if (hz % GHZ == 0) {
27 return ncycles / (hz / GHZ);
28 } else if (hz % MHZ == 0) {
29 return ncycles * MS_IN_S / (hz / MHZ);
30 } else if (hz % KHZ == 0) {
31 return ncycles * US_IN_S / (hz / KHZ);
34 return (ncycles * NS_IN_S) / hz;
42 static inline uint64_t freq_ns_and_hz_to_cycles(uint64_t ns, freq_t hz)
44 return (ns * hz) / NS_IN_S;