This commit is contained in:
Connor 2018-03-03 15:49:11 -08:00 committed by GitHub
parent 1ec021fc8a
commit dd81f51280

17
clock.h
View file

@ -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,