| 1 | /** |
| 2 | * This file has no copyright assigned and is placed in the Public Domain. |
| 3 | * This file is part of the mingw-w64 runtime package. |
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 | */ |
| 6 | |
| 7 | #ifndef _TIMERAPI_H_ |
| 8 | #define _TIMERAPI_H_ |
| 9 | |
| 10 | #include <apiset.h> |
| 11 | #include <apisetcconv.h> |
| 12 | |
| 13 | #include <mmsyscom.h> |
| 14 | |
| 15 | #ifdef __cplusplus |
| 16 | extern "C" { |
| 17 | #endif |
| 18 | |
| 19 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| 20 | |
| 21 | #ifndef MMNOTIMER |
| 22 | |
| 23 | #define TIMERR_NOERROR (0) |
| 24 | #define TIMERR_NOCANDO (TIMERR_BASE+1) |
| 25 | #define TIMERR_STRUCT (TIMERR_BASE+33) |
| 26 | |
| 27 | typedef struct timecaps_tag { |
| 28 | UINT wPeriodMin; |
| 29 | UINT wPeriodMax; |
| 30 | } TIMECAPS, *PTIMECAPS, *NPTIMECAPS, *LPTIMECAPS; |
| 31 | |
| 32 | WINMMAPI MMRESULT WINAPI timeGetSystemTime(LPMMTIME pmmt, UINT cbmmt); |
| 33 | |
| 34 | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| 35 | |
| 36 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) |
| 37 | |
| 38 | WINMMAPI DWORD WINAPI timeGetTime(void); |
| 39 | |
| 40 | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) */ |
| 41 | |
| 42 | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| 43 | |
| 44 | WINMMAPI MMRESULT WINAPI timeGetDevCaps(LPTIMECAPS ptc, UINT cbtc); |
| 45 | WINMMAPI MMRESULT WINAPI timeBeginPeriod(UINT uPeriod); |
| 46 | WINMMAPI MMRESULT WINAPI timeEndPeriod(UINT uPeriod); |
| 47 | |
| 48 | #endif /* ifndef MMNOTIMER */ |
| 49 | |
| 50 | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| 51 | |
| 52 | #ifdef __cplusplus |
| 53 | } |
| 54 | #endif |
| 55 | |
| 56 | #endif /* _TIMERAPI_H_ */ |