Ah, this was still in use in Scavenger. It can stay for now

This commit is contained in:
Chris Cannam
2022-07-14 17:49:22 +01:00
parent 511645fed2
commit d211121701
2 changed files with 21 additions and 0 deletions

View File

@@ -150,6 +150,22 @@ system_is_multiprocessor()
return mp; return mp;
} }
#ifdef _WIN32
void gettimeofday(struct timeval *tv, void *tz)
{
union {
long long ns100;
FILETIME ft;
} now;
::GetSystemTimeAsFileTime(&now.ft);
tv->tv_usec = (long)((now.ns100 / 10LL) % 1000000LL);
tv->tv_sec = (long)((now.ns100 - 116444736000000000LL) / 10000000LL);
}
#endif
void system_specific_initialise() void system_specific_initialise()
{ {
#if defined HAVE_IPP #if defined HAVE_IPP

View File

@@ -99,6 +99,11 @@ extern bool system_is_multiprocessor();
extern void system_specific_initialise(); extern void system_specific_initialise();
extern void system_specific_application_initialise(); extern void system_specific_application_initialise();
#ifdef _WIN32
struct timeval { long tv_sec; long tv_usec; };
void gettimeofday(struct timeval *p, void *tz);
#endif // _WIN32
} // end namespace } // end namespace
// The following should be functions in the RubberBand namespace, really // The following should be functions in the RubberBand namespace, really