MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / clock_gettime

Function clock_gettime

dependencies/hidapi/hidapi.c:141–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139#ifdef WIN32
140#define CLOCK_REALTIME 0
141 static int clock_gettime(int x, struct timespec *spec) //C-file part
142 {
143 __int64 wintime; GetSystemTimeAsFileTime((FILETIME*)&wintime);
144 wintime -= 116444736000000000i64; //1jan1601 to 1jan1970
145 spec->tv_sec = wintime / 10000000i64; //seconds
146 spec->tv_nsec = wintime % 10000000i64 * 100; //nano-seconds
147 return 0;
148 }
149#endif
150
151#if 0

Callers 1

hid_read_timeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected