Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unreal Speccy Portable - ZX Spectrum Emulator
04-30-2013, 04:47 PM (This post was last modified: 04-30-2013 04:48 PM by xsacha.)
Post: #11
RE: Unreal Speccy Portable - ZX Spectrum Emulator
(04-30-2013 10:59 AM)djdron Wrote:  Strange, but when i turn debug stats on, the most active syscall is sceKernelLibcGettimeofday.
But it called twice or once per frame (depends on emulator speed).
Well it is quite odd that it's stuck in sceKernelLibcGettimeofday. This function is only implemented on Windows.

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;
}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Unreal Speccy Portable - ZX Spectrum Emulator - xsacha - 04-30-2013 04:47 PM

Forum Jump: