|
|
Retrieves the tick counts that have elapsed since MiniGUI was started. This function retrieves the tick counts that have elapsed since MiniGUI was started. It is limited to the resolution of the system timer, i.e. for a general Linux box, the returned tick count value is in unit of 10ms.
|
|
|
Determines whether there is any free timer slot in the system. This function determines whether there is any free timer slot in the system.
|
|
||||||||||||
|
Determines whether a timer is installed. This function determines whether a timer with identifier id of a window hwnd has been installed.
|
|
||||||||||||
|
Destroys a timer. This function destroys the specified timer id.
|
|
||||||||||||||||
|
Adjusts a timer with a different timeout value. This function resets a timer with the specified timeout speed value.
|
|
||||||||||||||||
|
Creates a timer with the specified timeout value. This function creates a timer with the specified timeout value speed. By default, the timeout value is in unit of 10 ms. When the timer expires, an MSG_TIMER message will be send to the window hWnd.
/* * A typical handling of timer. */ int FlyingGUIWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { switch (message) { case MSG_CREATE: /* create a timer which expires every 100 ms, and whose id is 100. */ #ifdef _TIMER_UNIT_10MS SetTimer (hWnd, 100, 10); #else SetTimer (hWnd, 100, 100); #endif break; /* handling the MSG_TIMER message. */ case MSG_TIMER: if (wParam == 100) /* if it is the timer whose id is 100. */ InvalidateRect (hWnd, NULL, FALSE); break; case MSG_CLOSE: /* kill the timer whose id is 100. */ KillTimer (hWnd, 100); DestroyMainWindow (hWnd); PostQuitMessage (hWnd); return 0; } return DefaultMainWinProc(hWnd, message, wParam, lParam); } |
1.4.2