|
Last change
on this file since 481 was 95, checked in by phaller, 26 years ago |
|
Add: added cvs variable $Id$ to source files.
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | /* $Id: os2timer.h,v 1.3 1999-06-10 16:24:34 phaller Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | #ifndef __OS2TIMER_H__
|
|---|
| 4 | #define __OS2TIMER_H__
|
|---|
| 5 | /*
|
|---|
| 6 | * OS/2 Timer class
|
|---|
| 7 | *
|
|---|
| 8 | * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
|
|---|
| 9 | *
|
|---|
| 10 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 11 | *
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | #ifdef _OS2WIN_H
|
|---|
| 15 | #define HEV int
|
|---|
| 16 | #define HTIMER int
|
|---|
| 17 | #endif
|
|---|
| 18 |
|
|---|
| 19 | class OS2Timer
|
|---|
| 20 | {
|
|---|
| 21 | public:
|
|---|
| 22 | OS2Timer();
|
|---|
| 23 | ~OS2Timer();
|
|---|
| 24 |
|
|---|
| 25 | void TimerHandler();
|
|---|
| 26 | BOOL StartTimer(int period, int resolution, LPTIMECALLBACK lptc,
|
|---|
| 27 | int dwUser, int fuEvent);
|
|---|
| 28 | void StopTimer();
|
|---|
| 29 | void KillTimer();
|
|---|
| 30 |
|
|---|
| 31 | protected:
|
|---|
| 32 |
|
|---|
| 33 | private:
|
|---|
| 34 | HEV TimerSem;
|
|---|
| 35 | HTIMER TimerHandle;
|
|---|
| 36 | int TimerThreadID;
|
|---|
| 37 | LPTIMECALLBACK clientCallback;
|
|---|
| 38 | DWORD userData;
|
|---|
| 39 |
|
|---|
| 40 | BOOL fFatal;
|
|---|
| 41 | int TimerStatus;
|
|---|
| 42 | enum {
|
|---|
| 43 | InActive = 0,
|
|---|
| 44 | Running,
|
|---|
| 45 | Stopped
|
|---|
| 46 | };
|
|---|
| 47 | static int timerPeriod;
|
|---|
| 48 |
|
|---|
| 49 | // Linked list management
|
|---|
| 50 | OS2Timer* next; // Next Timer
|
|---|
| 51 | static OS2Timer* timers; // List of Timer
|
|---|
| 52 |
|
|---|
| 53 | };
|
|---|
| 54 |
|
|---|
| 55 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.