mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
Fix ogl screenshots for windows.
Fix the macosx build (perhaps). This changes the JitIL timed profiling to using assembly language to obtain the time. It does seem to be faster. Not sure if it will work on macosx, but if it does it has the necessary precision that gettimeofday does not have. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6448 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -492,11 +492,16 @@ namespace Common
|
||||
|
||||
if (timeout != INFINITE)
|
||||
{
|
||||
memset(&wait, 0, sizeof(wait));
|
||||
#ifdef USE_GETTIMEOFDAY
|
||||
struct timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
wait.tv_nsec = (now.tv_usec + (timeout % 1000)) * 1000;
|
||||
#else
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &now);
|
||||
|
||||
memset(&wait, 0, sizeof(wait));
|
||||
wait.tv_nsec = now.tv_nsec + (timeout % 1000) * 1000000;
|
||||
#endif
|
||||
wait.tv_sec = now.tv_sec + (timeout / 1000);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user