MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / aeDeleteTimeEvent

Function aeDeleteTimeEvent

src/ae.cpp:519–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519extern "C" int aeDeleteTimeEvent(aeEventLoop *eventLoop, long long id)
520{
521 serverAssert(g_eventLoopThisThread == NULL || g_eventLoopThisThread == eventLoop);
522 aeTimeEvent *te = eventLoop->timeEventHead;
523 while(te) {
524 if (te->id == id) {
525 te->id = AE_DELETED_EVENT_ID;
526 return AE_OK;
527 }
528 te = te->next;
529 }
530 return AE_ERR; /* NO event with the specified ID found */
531}
532
533/* How many microseconds until the first timer should fire.
534 * If there are no timers, -1 is returned.

Callers 1

RM_CreateTimerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected