Lines Matching full:period
36 * - Create two windows with a certain expiration period, and
37 * offsetted by period / 2.
57 * @period: the expiration period in nanoseconds
60 int64_t period) in update_expiration() argument
63 int64_t elapsed = (now - w->expiration) % period; in update_expiration()
65 int64_t remaining = period - elapsed; in update_expiration()
97 * @period: the time window period in nanoseconds
100 uint64_t period) in timed_average_init() argument
105 * the interval [ta->period/2,ta->period). By adjusting the in timed_average_init()
106 * requested period by 4/3, we guarantee that they're in the in timed_average_init()
107 * interval [2/3 period,4/3 period), closer to the requested in timed_average_init()
108 * period on average */ in timed_average_init()
109 ta->period = (uint64_t) period * 4 / 3; in timed_average_init()
116 /* Both windows are offsetted by half a period */ in timed_average_init()
117 ta->windows[0].expiration = now + ta->period / 2; in timed_average_init()
118 ta->windows[1].expiration = now + ta->period; in timed_average_init()
133 assert(ta->period != 0); in check_expirations()
140 update_expiration(w, now, ta->period); in check_expirations()
154 *elapsed = ta->period - remaining; in check_expirations()