mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
Implement gettimeofday kernel function for non-Windows platforms. Helps some homebrew run.
This commit is contained in:
1 parent
69e168a293
commit
7e3fed70cf
1 file changed
+4
-1
@@ -164,11 +164,14 @@ u32 sceKernelLibcGettimeofday(u32 timeAddr)
|
||||
};
|
||||
|
||||
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);
|
||||
#else
|
||||
timeval *tv = (timeval*)Memory::GetPointer(timeAddr);
|
||||
gettimeofday(tv, NULL);
|
||||
#endif
|
||||
DEBUG_LOG(HLE,"sceKernelLibcGettimeofday()");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user