Last change
on this file since 1570 was 1570, checked in by Gregg Young, 14 years ago |
Added IdleIfNeeded to place load and free loops to idle priority when dealing with large numbers of items. Used SleepIfNeeded more places for a similar purpose.
|
-
Property svn:eolstyle
set to
native
-
Property svn:keywords
set to
Id
|
File size:
842 bytes
|
Line | |
---|
1 |
|
---|
2 | /***********************************************************************
|
---|
3 |
|
---|
4 | $Id: tmrsvcs.h 1570 2011-06-12 22:09:19Z gyoung $
|
---|
5 |
|
---|
6 | Timing services interface
|
---|
7 |
|
---|
8 | Copyright (c) 2008 Steven H. Levine
|
---|
9 |
|
---|
10 | 05 Jan 08 SHL Baseline
|
---|
11 |
|
---|
12 | ***********************************************************************/
|
---|
13 |
|
---|
14 | #if !defined(TMRSVCS_H)
|
---|
15 | #define TMRSVCS_H
|
---|
16 |
|
---|
17 | #if !defined(OS2_INCLUDED)
|
---|
18 | #include <os2.h>
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | typedef struct {
|
---|
22 | INT remaining; // Remaining counts until time check
|
---|
23 | UINT estimated; // Estimated counts per interval
|
---|
24 | UINT misses;
|
---|
25 | UINT interval_msec; // msec per interval
|
---|
26 | ULONG start_msec; // Last tick time
|
---|
27 | } ITIMER_DESC;
|
---|
28 |
|
---|
29 | VOID InitITimer(ITIMER_DESC *pitd, UINT interval_msec);
|
---|
30 | BOOL IsITimerExpired(ITIMER_DESC *pitd);
|
---|
31 | VOID SleepIfNeeded(ITIMER_DESC *pitd, UINT sleepTime);
|
---|
32 | ULONG IdleIfNeeded(ITIMER_DESC *pitd, LONG delta);
|
---|
33 |
|
---|
34 | #endif // TMRSVCS_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.