| 232 | } |
| 233 | |
| 234 | int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id) |
| 235 | { |
| 236 | aeTimeEvent *te = eventLoop->timeEventHead; |
| 237 | while(te) { |
| 238 | if (te->id == id) { |
| 239 | te->id = AE_DELETED_EVENT_ID; |
| 240 | return AE_OK; |
| 241 | } |
| 242 | te = te->next; |
| 243 | } |
| 244 | return AE_ERR; /* NO event with the specified ID found */ |
| 245 | } |
| 246 | |
| 247 | /* How many microseconds until the first timer should fire. |
| 248 | * If there are no timers, -1 is returned. |