Home | History | Annotate | Download | only in kern

Lines Matching refs:interval

188  * .it_interval part of an interval timer is acceptable, and
192 * timer or the interval.
465 * time, it_interval = periodic rescheduling interval), and
483 int64_t last_val, next_val, interval, remainder, now_ns;
504 /* Valid value and interval guaranteed by itimerfix. */
510 /* Nonnegative interval guaranteed by itimerfix. */
536 interval = timespec2ns(&it->it_interval);
540 KASSERT(interval >= 0);
550 * Set next_val to last_value + k*interval for some k.
552 * The interval is always positive, and division in C
553 * truncates, so dividing a positive duration by the interval
555 * negative duration by the interval always gives zero or a
563 * one more interval if we are already firing exactly on the
564 * interval to find the earliest value _after_ now_ns.
570 * more interval to find the earliest value _after_ now_ns.
579 remainder = (now_ns - last_val) % interval;
581 KASSERT((last_val - next_val) % interval == 0);
585 * the interval, so next_val = now_ns, don't demand to
587 * next interval. Overflow is not possible; proof is
593 KASSERT(last_val - next_val >= interval);
594 KASSERT(interval <= last_val - next_val);
595 KASSERT(next_val <= last_val - interval);
596 KASSERT(next_val <= INT64_MAX - interval);
597 next_val += interval;
601 * next_val is the largest integer multiple of interval
604 * exact here), not counting any partial interval
606 * overruns. Advance by one interval -- unless that
610 (next_val - last_val) / interval);
611 if (__predict_false(next_val > INT64_MAX - interval))
613 next_val += interval;