source: trunk/src/winmm/winmm.cpp@ 4

Last change on this file since 4 was 4, checked in by ktk, 26 years ago

Import

File size: 2.5 KB
Line 
1/* $Id: winmm.cpp,v 1.1 1999-05-24 20:20:07 ktk Exp $ */
2
3/*
4 * Timer MM apis
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 *
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 */
12#include <os2win.h>
13#include "misc.h"
14
15#include "os2timer.h"
16
17/******************************************************************************/
18UINT WIN32API mmsystemGetVersion(void)
19{
20 dprintf(("WINMM:mmsystemGetVersion\n"));
21 return 4;
22}
23
24/******************************************************************************/
25MMRESULT WIN32API timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc)
26{
27 dprintf(("WINMM:timeGetDevCaps Not really Implemented\n"));
28 ptc->wPeriodMin = 1;
29 ptc->wPeriodMax = 20;
30 return TIMERR_NOERROR;
31}
32
33/******************************************************************************/
34MMRESULT WIN32API timeBeginPeriod(UINT cMilliseconds)
35{
36 dprintf(("WINMM:timeBeginPeriod %d ms\n", cMilliseconds));
37 return TIMERR_NOERROR;
38}
39/******************************************************************************/
40/******************************************************************************/
41MMRESULT WIN32API timeEndPeriod(UINT cMilliseconds)
42{
43 dprintf(("WINMM:timeEndPeriod %d ms\n", cMilliseconds));
44 return TIMERR_NOERROR;
45}
46/******************************************************************************/
47/******************************************************************************/
48MMRESULT WIN32API timeKillEvent(UINT IDEvent)
49{
50 dprintf(("WINMM:timeKillEvent Not Implemented\n"));
51 delete((OS2Timer *)IDEvent);
52 return TIMERR_NOERROR;
53}
54/******************************************************************************/
55/******************************************************************************/
56MMRESULT WIN32API timeSetEvent(UINT wDelay, UINT wResolution, LPTIMECALLBACK lptc,
57 DWORD dwUser, UINT fuEvent)
58{
59 OS2Timer *timer;
60
61 dprintf(("WINMM:timeSetEvent %d\n", wDelay));
62
63 timer = new OS2Timer();
64 if(timer == NULL) {
65 return(0);
66 }
67 if(timer->StartTimer(wDelay, wResolution, lptc, dwUser, fuEvent) == FALSE) {
68 dprintf(("WINMM:timeSetEvent: couldn't start timer!\n"));
69 delete(timer);
70 return(0);
71 }
72 return(MMRESULT)timer;
73}
74
75/******************************************************************************/
76MMRESULT WIN32API timeGetSystemTime( LPMMTIME arg1, UINT arg2)
77{
78 dprintf(("WINMM:timeGetSystemTime\n"));
79 return O32_timeGetSystemTime(arg1, arg2);
80}
Note: See TracBrowser for help on using the repository browser.