This commit is contained in:
parent
1ec021fc8a
commit
dd81f51280
1 changed files with 11 additions and 6 deletions
17
clock.h
17
clock.h
|
@ -127,9 +127,9 @@ struct PsnipClockTimespec {
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# if !defined(PSNIP_CLOCK_MONOTONIC_METHOD)
|
# if !defined(PSNIP_CLOCK_MONOTONIC_METHOD)
|
||||||
# if defined(CLOCK_MONOTONIC_RAW)
|
# if defined(CLOCK_MONOTONIC_RAW) && !defined(__EMSCRIPTEN__)
|
||||||
# define PSNIP_CLOCK_MONOTONIC_METHOD PSNIP_CLOCK_METHOD_CLOCK_GETTIME
|
# define PSNIP_CLOCK_MONOTONIC_METHOD PSNIP_CLOCK_METHOD_CLOCK_GETTIME
|
||||||
# define PSNIP_CLOCK_CLOCK_GETTIME_MONOTONIC CLOCK_MONOTONIC
|
# define PSNIP_CLOCK_CLOCK_GETTIME_MONOTONIC CLOCK_MONOTONIC_RAW
|
||||||
# elif defined(CLOCK_MONOTONIC_PRECISE)
|
# elif defined(CLOCK_MONOTONIC_PRECISE)
|
||||||
# define PSNIP_CLOCK_MONOTONIC_METHOD PSNIP_CLOCK_METHOD_CLOCK_GETTIME
|
# define PSNIP_CLOCK_MONOTONIC_METHOD PSNIP_CLOCK_METHOD_CLOCK_GETTIME
|
||||||
# define PSNIP_CLOCK_CLOCK_GETTIME_MONOTONIC CLOCK_MONOTONIC_PRECISE
|
# define PSNIP_CLOCK_CLOCK_GETTIME_MONOTONIC CLOCK_MONOTONIC_PRECISE
|
||||||
|
@ -203,10 +203,15 @@ typedef union _LARGE_INTEGER {
|
||||||
} u;
|
} u;
|
||||||
int64_t QuadPart;
|
int64_t QuadPart;
|
||||||
} LARGE_INTEGER;
|
} LARGE_INTEGER;
|
||||||
void * __stdcall GetCurrentProcess(void);
|
#ifdef __cplusplus
|
||||||
int __stdcall QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);
|
#define PSNIP_EXTERN extern "C"
|
||||||
int __stdcall QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
|
#else
|
||||||
int __stdcall GetProcessTimes(
|
#define PSNIP_EXTERN
|
||||||
|
#endif
|
||||||
|
PSNIP_EXTERN void * __stdcall GetCurrentProcess(void);
|
||||||
|
PSNIP_EXTERN int __stdcall QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);
|
||||||
|
PSNIP_EXTERN int __stdcall QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount);
|
||||||
|
PSNIP_EXTERN int __stdcall GetProcessTimes(
|
||||||
void *hProcess,
|
void *hProcess,
|
||||||
FILETIME *lpCreationTime,
|
FILETIME *lpCreationTime,
|
||||||
FILETIME *lpExitTime,
|
FILETIME *lpExitTime,
|
||||||
|
|
Loading…
Add table
Reference in a new issue