update for HEAD-2003091401
[reactos.git] / lib / winmm / time.c
1 /* FIXME:  This should query the time for caps instead.
2            However, this should work fine for our needs */
3
4 #include <windows.h>
5 typedef UINT *LPUINT;
6 #include <mmsystem.h>
7
8 /* This is what it seems to be on my machine.  (WinXP) */
9 #define MMSYSTIME_MININTERVAL 1
10 #define MMSYSTIME_MAXINTERVAL 1000000
11
12 MMRESULT WINAPI timeGetDevCaps(
13   LPTIMECAPS ptc,  
14   UINT cbtc        
15 )
16 {
17         ptc->wPeriodMin = 1;
18         ptc->wPeriodMax = 1000000;
19
20         return TIMERR_NOERROR;
21 }
22
23 MMRESULT WINAPI timeBeginPeriod(
24   UINT uPeriod  
25 )
26 {
27         if (uPeriod < MMSYSTIME_MININTERVAL || uPeriod > MMSYSTIME_MAXINTERVAL)
28                 return TIMERR_NOCANDO;
29         else
30                 return TIMERR_NOERROR;
31 }
32
33 MMRESULT WINAPI timeEndPeriod(
34   UINT uPeriod  
35 )
36 {
37         if (uPeriod < MMSYSTIME_MININTERVAL || uPeriod > MMSYSTIME_MAXINTERVAL)
38                 return TIMERR_NOCANDO;
39         else
40                 return TIMERR_NOERROR;
41 }
42
43 /* EOF */