78#define MMSYSTIME_MININTERVAL (1)
79#define MMSYSTIME_MAXINTERVAL (65535)
84 TRACE(
"%04lx:CallBack => lpFunc=%p wTimerID=%04X dwUser=%08lX dwTriggerTime %ld(delta %ld)\n",
93 switch (lpTimer->
wFlags & 0x30) {
104 FIXME(
"Unknown callback type 0x%04x for mmtime callback (%p), ignored.\n",
115static int nSizeLpTimers;
150 next_ptimer = &timer->
lpNext;
154 if (
idx == nSizeLpTimers) {
164 lpTimers[
idx++] = *timer;
176 *ptimer = *next_ptimer;
196 ret_time =
min(ret_time, delta_time);
198 ptimer = next_ptimer;
210 if (adjust_time > ret_time)
213 ret_time -= adjust_time;
228 TRACE(
"Starting main winmm thread\n");
250 TRACE(
"Exiting main winmm thread\n");
294 if (wSize >=
sizeof(*lpTime)) {
319 if (lpNewTimer ==
NULL)
352 TRACE(
"=> %u\n", wNewID + 1);
374 TRACE(
"(%u)\n", wID);
378 if (wID == (*lpTimer)->wTimerID) {
381 *lpTimer = (*lpTimer)->
lpNext;
389 WARN(
"wID=%u is not a valid timer ID\n", wID);
392 if (lpSelf->
wFlags & TIME_KILL_SYNCHRONOUS)
403 TRACE(
"(%p, %u)\n", lpCaps, wSize);
406 WARN(
"invalid lpCaps\n");
411 WARN(
"invalid wSize\n");
437 WARN(
"Stub; we set our timer resolution at minimum\n");
457 WARN(
"Stub; we set our timer resolution at minimum\n");
469#if defined(COMMENTOUTPRIORTODELETING)
475 if (pFnReleaseThunkLock) pFnReleaseThunkLock(&
count);
476 if (pFnRestoreThunkLock) pFnRestoreThunkLock(
count);
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
DWORD WINAPI GetTickCount(VOID)
static BOOL TIME_TimeToDie
static DWORD CALLBACK TIME_MMSysTimeCallback()
struct tagWINE_TIMERENTRY WINE_TIMERENTRY
MMRESULT WINAPI timeBeginPeriod(UINT wPeriod)
static LARGE_INTEGER TIME_qpcFreq
static HANDLE TIME_hMMTimer
DWORD WINAPI timeGetTime(void)
MMRESULT WINAPI timeKillEvent(UINT wID)
MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS lpCaps, UINT wSize)
void TIME_MMTimeStop(void)
#define MMSYSTIME_MAXINTERVAL
static HANDLE TIME_hKillEvent
static DWORD CALLBACK TIME_MMSysTimeThread(LPVOID arg)
static HANDLE TIME_hWakeEvent
void TIME_MMTimeStart(void)
static LPWINE_TIMERENTRY TIME_TimersList
struct tagWINE_TIMERENTRY * LPWINE_TIMERENTRY
MMRESULT WINAPI timeGetSystemTime(LPMMTIME lpTime, UINT wSize)
MMRESULT WINAPI timeSetEvent(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc, DWORD_PTR dwUser, UINT wFlags)
static void TIME_TriggerCallBack(LPWINE_TIMERENTRY lpTimer)
MMRESULT WINAPI timeEndPeriod(UINT wPeriod)
#define MMSYSTIME_MININTERVAL
WORD TIME_SetEventInternal(UINT wDelay, UINT wResol, LPTIMECALLBACK lpFunc, DWORD dwUser, UINT wFlags)
GLuint GLuint GLsizei count
#define TIME_CALLBACK_EVENT_PULSE
#define MMSYSERR_INVALPARAM
#define TIME_CALLBACK_EVENT_SET
#define TIME_CALLBACK_FUNCTION
TIMECALLBACK * LPTIMECALLBACK
union mmtime_tag::@3032 u
struct tagWINE_TIMERENTRY * lpNext
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
BOOL WINAPI DECLSPEC_HOTPATCH PulseEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define THREAD_PRIORITY_TIME_CRITICAL
_In_ DWORD _Out_ _In_ WORD wFlags
CRITICAL_SECTION WINMM_cs