/usr/include/SuperCollider/common/wintime.h is in supercollider-dev 1:3.8.0~repack-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #ifndef WINTIME_H
#define WINTIME_H
#include <WinSock2.h> // for timeval struct
#include <windows.h>
/*
Implementation as per:
The Open Group Base Specifications, Issue 6
IEEE Std 1003.1, 2004 Edition
The timezone pointer arg is ignored. Errors are ignored.
*/
inline int gettimeofday(struct timeval* p, void* tz /* IGNORED */)
{
union {
long long ns100; /*time since 1 Jan 1601 in 100ns units */
FILETIME ft;
} now;
GetSystemTimeAsFileTime(&(now.ft));
p->tv_usec = (long)((now.ns100 / 10LL) % 1000000LL);
p->tv_sec = (long)((now.ns100 - (116444736000000000LL)) / 10000000LL);
return 0;
}
#endif
|