Lines Matching refs:time
36 * description: These routines maintain a time-ordered list of events.
40 * add(&event, time, id) : Adds an event to the list.
42 * -2 if event time is lower
43 * than Lower Bound time LB
65 #define INFINITY 2147483647L /* upper bound on time */
70 static int DU; /* number of time intervals */
71 static time_t LB; /* lower bound on time */
77 * time = time of the event.
83 * the time intervals that the user specifies in init).
89 struct notice { time_t time;
102 * time = max time of notices in sublist.
104 * notice = pointer to the notice with max time.
108 struct key { time_t time;
115 * the index list breaks the keys into time intervals as specified in init.
116 * the index is "shifted" one time interval whenever el_first returns an
117 * event with a time greater than the max time of the first interval
154 n->time = LB;
160 k->time = LB;
167 /* no index element to allocate this time */
174 n->time = t;
180 k->time = t;
196 n->time = INFINITY;
203 k->time = INFINITY;
222 el_add(event, time, id)
226 time_t time;
241 * time may be 0 when set by next_time() on error or an
242 * invalid time specification of job
244 if ((index == NULL) || (time <= 0)) {
247 if (time < LB) {
253 n->time = time;
261 while ((ind->key)->time <= time) ind = ind->right;
265 while (k->time > time) k = k->left;
268 /* (k->time>time) and ((k->left)->time<=time) */
276 k2->time = n2->time;
285 if (k2->time > time) k = k2; }
293 while (n2->time > time) n2 = n2->left;
299 if ((current == NULL) || (current->time > time))
340 (n->key)->time = (n->left)->time;
415 while ((index->key)->time < current->time) {
419 k->time += DT;
420 (k->notice)->time += DT;
424 * to the first time interval. Then split the
441 next_int = k->time + DT; /* upper bound on new inter. */
442 while (k->time < next_int) k = k->right;
446 while (n->time >= next_int) {
459 fk->time = next_int;
467 fn->time = next_int;