Lines Matching refs:ns
121 /* Set up the timer to fire an interrupt every ns nanoseconds.
122 * The first such interrupt may arrive before ns nanoseconds
124 int spt_set_timeout(spt_t *spt, uint64_t ns)
129 uint64_t ticks = ns / (NS_IN_US / (spt->freq / MHZ));
131 spt->counter_start = ns;
133 ZF_LOGE("ns too low: %llu\n", ns);
143 ZF_LOGE("ns too high: %llu\n", ns);
181 /* convert raw count to ns. As we never change the free run prescaler we do not need to
184 uint64_t ns = (value * MHZ / spt->freq) * NS_IN_US;
185 return ns;