I'm trying to compile and create a dynamic linking library for Apache-Age.
There's a use of clock_gettime() in src/backend/utils/adt/agetype.c
to get the timestamp of query.
SYSTEMTIME st;
GetSystemTime(&st);
clock_gettime(st, &ts);
ms += (ts.tv_sec * 1000) + (ts.tv_nsec / 1000000);
I followed this stackoverflow answers but in all the answers clock_gettime() is accepting CLOCK_REALTIME
as a parameter which is also not available in MSVC.
But in AGE implementation st variable of type SYSTEMTIME
struct is used defined in minwinbase.h
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
How can I make my own clock_gettime() with SYSTEMTIME
as a parameter.