- Added 'time.c' for time functions

- Updated makefile

No longer compiles due to errors?!?  I could use some help here.  Anyone want to tell me what i'm doing wrong?

svn path=/trunk/; revision=5615
This commit is contained in:
Richard Campbell 2003-08-17 12:32:05 +00:00
parent 59ac5f2e25
commit 8568d5b2bb
2 changed files with 43 additions and 0 deletions

View file

@ -17,6 +17,7 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = \
dllmain.o \
time.o \
misc/stubs.o
include $(PATH_TO_TOP)/rules.mak

42
reactos/lib/winmm/time.c Normal file
View file

@ -0,0 +1,42 @@
/* FIXME: This should query the time for caps instead.
However, this should work fine for our needs */
#include <windows.h>
#include <MMSystem.h>
/* This is what it seems to be on my machine. (WinXP) */
#define MMSYSTIME_MININTERVAL 1
#define MMSYSTIME_MAXINTERVAL 1000000
MMRESULT timeGetDevCaps(
LPTIMECAPS ptc,
UINT cbtc
)
{
ptc->wPeriodMin = 1;
ptc->wPeriodMax = 1000000;
return TIMERR_NOERROR;
}
MMRESULT timeBeginPeriod(
UINT uPeriod
)
{
if (uPeriod < MMSYSTIME_MININTERVAL || uPeriod > MMSYSTIME_MAXINTERVAL)
return TIMERR_NOCANDO;
else
return TIMERR_NOERROR;
}
MMRESULT timeEndPeriod(
UINT uPeriod
)
{
if (uPeriod < MMSYSTIME_MININTERVAL || uPeriod > MMSYSTIME_MAXINTERVAL)
return TIMERR_NOCANDO;
else
return TIMERR_NOERROR;
}
/* EOF */