MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / modTimerRemove

Function modTimerRemove

modules/base/timer/mc/timer.c:208–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208void modTimerRemove(modTimer timer)
209{
210 modCriticalSectionDeclare;
211 modTimer walker, prev = NULL;
212
213 modCriticalSectionBegin();
214
215 for (walker = gTimers; NULL != walker; prev = walker, walker = walker->next) {
216 if (timer == walker) {
217 timer->flags = kTimerFlagUnscheduled;
218
219 timer->useCount--;
220 if (timer->useCount <= 0) {
221 if (NULL == prev)
222 gTimers = walker->next;
223 else
224 prev->next = walker->next;
225 c_free(timer);
226 modInstrumentationAdjust(Timers, -1);
227 }
228 break;
229 }
230 }
231
232 modCriticalSectionEnd();
233}
234
235void modTimerDelayMS(uint32_t ms)
236{

Callers 15

modTimersExecuteFunction · 0.70
picoAudioCallbackFunction · 0.50
socketStateMachineFunction · 0.50
xs_ble_server_destructorFunction · 0.50
xs_ble_client_destructorFunction · 0.50
doDestructorFunction · 0.50
xs_sensor_destructorFunction · 0.50
doDeactivateFunction · 0.50
xs_serial_destructorFunction · 0.50
audioOutReleaseFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected