mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 23:55:07 +00:00
- 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:
parent
59ac5f2e25
commit
8568d5b2bb
|
@ -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
42
reactos/lib/winmm/time.c
Normal 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 */
|
Loading…
Reference in a new issue