+/*
+ * TODO:
+ * * Keep more accurate statistics by simulating good interval timers.
+ * * Use the time-of-day clock on the VAX to keep more accurate time
+ * than is possible by repeated use of the interval timer.
+ * * Allocate more timeout table slots when table overflows.
+ */
+
+/* bump a timeval by a small number of usec's */
+#define bumptime(tp, usec) \
+ (tp)->tv_usec += usec; \
+ if ((tp)->tv_usec >= 1000000) { \
+ (tp)->tv_usec -= 1000000; \
+ (tp)->tv_sec++; \
+ }
+
+/*
+ * The (single) hardware interval timer.
+ * We update the events relating to real time, and then
+ * make a gross assumption: that the system has been in the
+ * state it is in (user state, kernel state, interrupt state,
+ * or idle state) for the entire last time interval, and
+ * update statistics accordingly.
+ */