Lines Matching full:period
28 int64_t period; member
54 uint64_t period; in ptimer_reload() local
79 period = s->period; in ptimer_reload()
86 if (s->period == 0 && s->period_frac == 0) { in ptimer_reload()
88 fprintf(stderr, "Timer with period zero, disabling\n"); in ptimer_reload()
141 if (s->enabled == 1 && (delta * period < 10000) && in ptimer_reload()
143 period = 10000 / delta; in ptimer_reload()
148 s->next_event = s->last_event + delta * period; in ptimer_reload()
223 uint64_t period = s->period; in ptimer_get_count() local
225 if (!oneshot && (s->delta * period < 10000) && in ptimer_get_count()
227 period = 10000 / s->delta; in ptimer_get_count()
231 /* We need to divide time by period, where time is stored in in ptimer_get_count()
232 rem (64-bit integer) and period is stored in period/period_frac in ptimer_get_count()
242 div = period; in ptimer_get_count()
264 for a one period. */ in ptimer_get_count()
269 that "one period". */ in ptimer_get_count()
276 by +1 and right now it is that adjusted period. */ in ptimer_get_count()
312 if (was_disabled && s->period == 0 && s->period_frac == 0) { in ptimer_run()
314 fprintf(stderr, "Timer with period zero, disabling\n"); in ptimer_run()
340 void ptimer_set_period(ptimer_state *s, int64_t period) in ptimer_set_period() argument
344 s->period = period; in ptimer_set_period()
356 * The raw clock period is a 64-bit value in units of 2^-32 ns; in ptimer_set_period_from_clock()
358 * representation of the period is 64.32 fixed point ns, so in ptimer_set_period_from_clock()
366 s->period = extract64(raw_period, 32, 32); in ptimer_set_period_from_clock()
370 * clock and the timer, so it is a multiplier on the period. in ptimer_set_period_from_clock()
371 * We do the multiply after splitting the raw period out into in ptimer_set_period_from_clock()
372 * period and frac to avoid having to do a 32*64->96 multiply. in ptimer_set_period_from_clock()
374 s->period *= divisor; in ptimer_set_period_from_clock()
376 s->period += extract64(period_frac, 32, 32); in ptimer_set_period_from_clock()
389 s->period = 1000000000ll / freq; in ptimer_set_freq()
449 VMSTATE_INT64(period, ptimer_state),