Lines Matching full:cycles
62 static void update_match(uint32_t cycles, uint32_t match) in update_match() argument
64 uint32_t delta = match - cycles; in update_match()
77 uint32_t cycles; in ttc_isr() local
86 cycles = read_count(); in ttc_isr()
90 ticks = (cycles - last_cycles) / CYCLES_PER_TICK; in ttc_isr()
92 /* Update last cycles count */ in ttc_isr()
93 last_cycles = cycles; in ttc_isr()
96 update_match(cycles, cycles + CYCLES_PER_TICK); in ttc_isr()
109 uint32_t cycles; in sys_clock_set_timeout() local
113 cycles = read_count(); in sys_clock_set_timeout()
117 next_cycles = cycles + CYCLES_NEXT_MAX; in sys_clock_set_timeout()
119 next_cycles = cycles + ((uint32_t)ticks * CYCLES_PER_TICK); in sys_clock_set_timeout()
123 update_match(cycles, next_cycles); in sys_clock_set_timeout()
130 uint32_t cycles; in sys_clock_elapsed() local
133 cycles = read_count(); in sys_clock_elapsed()
136 return (cycles - last_cycles) / CYCLES_PER_TICK; in sys_clock_elapsed()