static unsigned long _stdcall timer_thread_func(void *dummy) { thread_debug("timer_thread\n"); while (WaitForSingleObject(timer_thread_lock, WIN32_WAIT_TIMEOUT) == WAIT_TIMEOUT) { timer_thread_function(dummy); } thread_debug("timer killed\n"); return 0; }
static unsigned long _stdcall timer_thread_func(void *dummy) { thread_debug("timer_thread\n"); while (system_working) { Sleep(WIN32_WAIT_TIMEOUT); timer_thread_function(); } thread_debug("timer killed\n"); return 0; }