(04-30-2013, 10:59 AM)djdron Wrote: Strange, but when i turn debug stats on, the most active syscall is sceKernelLibcGettimeofday.Well it is quite odd that it's stuck in sceKernelLibcGettimeofday. This function is only implemented on Windows.
But it called twice or once per frame (depends on emulator speed).
Here is the function:
Code:
u32 sceKernelLibcGettimeofday(u32 timeAddr)
{
#ifdef _WIN32
union {
s64 ns100; /*time since 1 Jan 1601 in 100ns units */
FILETIME ft;
} now;
struct timeval
{
u32 tv_sec;
u32 tv_usec;
};
timeval *tv = (timeval*)Memory::GetPointer(timeAddr);
DEBUG_LOG(HLE,"sceKernelLibcGettimeofday()");
GetSystemTimeAsFileTime (&now.ft);
tv->tv_usec = (long) ((now.ns100 / 10LL) % 1000000LL);
tv->tv_sec = (long) ((now.ns100 - 116444736000000000LL) / 10000000LL);
#endif
return 0;
}
