mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +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:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
Reference in New Issue
Block a user