| 119 | } |
| 120 | |
| 121 | void timer_addmono(struct timers *timers, struct timer *t, struct timemono when) |
| 122 | { |
| 123 | assert(list_node_initted(&t->list)); |
| 124 | |
| 125 | t->time = time_to_grains(when); |
| 126 | |
| 127 | /* Added in the past? Treat it as imminent. */ |
| 128 | if (t->time < timers->base) |
| 129 | t->time = timers->base; |
| 130 | if (t->time < timers->first) |
| 131 | timers->first = t->time; |
| 132 | |
| 133 | timer_add_raw(timers, t); |
| 134 | } |
| 135 | |
| 136 | /* FIXME: inline */ |
| 137 | void timer_del(struct timers *timers UNNEEDED, struct timer *t) |