Either stops a timer before firing or returns after the callback has completed (in the threadpool thread). Never "in doubt".
| 2111 | // Either stops a timer before firing or returns after the callback has |
| 2112 | // completed (in the threadpool thread). Never "in doubt". |
| 2113 | static bool stop_timer(HANDLE tqueue, HANDLE *timer) { |
| 2114 | if (!*timer) return true; |
| 2115 | if (DeleteTimerQueueTimer(tqueue, *timer, INVALID_HANDLE_VALUE)) { |
| 2116 | *timer = NULL; |
| 2117 | return true; |
| 2118 | } |
| 2119 | return false; // error |
| 2120 | } |
| 2121 | |
| 2122 | static bool start_timer(HANDLE tqueue, HANDLE *timer, WAITORTIMERCALLBACK cb, void *cb_arg, DWORD time) { |
| 2123 | if (*timer) { |
no outgoing calls
no test coverage detected