Home | History | Annotate | Download | only in kern

Lines Matching defs:interval

160  * .it_interval part of an interval timer is acceptable, and
164 * timer or the interval.
437 * time, it_interval = periodic rescheduling interval), and
455 int64_t last_val, next_val, interval, remainder, now_ns;
476 /* Valid value and interval guaranteed by itimerfix. */
482 /* Nonnegative interval guaranteed by itimerfix. */
508 interval = timespec2ns(&it->it_interval);
512 KASSERT(interval >= 0);
522 * Set next_val to last_value + k*interval for some k.
524 * The interval is always positive, and division in C
525 * truncates, so dividing a positive duration by the interval
527 * negative duration by the interval always gives zero or a
535 * one more interval if we are already firing exactly on the
536 * interval to find the earliest value _after_ now_ns.
542 interval to find the earliest value _after_ now_ns.
551 remainder = (now_ns - last_val) % interval;
553 KASSERT((last_val - next_val) % interval == 0);
557 * the interval, so next_val = now_ns, don't demand to
559 * next interval. Overflow is not possible; proof is
565 KASSERT(last_val - next_val >= interval);
566 KASSERT(interval <= last_val - next_val);
567 KASSERT(next_val <= last_val - interval);
568 KASSERT(next_val <= INT64_MAX - interval);
569 next_val += interval;
573 * next_val is the largest integer multiple of interval
576 * exact here), not counting any partial interval
578 * overruns. Advance by one interval -- unless that
582 (next_val - last_val) / interval);
583 if (__predict_false(next_val > INT64_MAX - interval))
585 next_val += interval;