mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-26 19:01:19 +01:00
Merge pull request #1124 from lioncash/timeofday
x32/Time: Implement settimeofday
This commit is contained in:
1 file changed
+12
@@ -36,6 +36,18 @@ namespace FEX::HLE::x32 {
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL_X32(settimeofday, [](FEXCore::Core::CpuStateFrame *Frame, const timeval32 *tv, const struct timezone *tz) -> uint64_t {
|
||||
struct timeval tv64{};
|
||||
struct timeval *tv_ptr{};
|
||||
if (tv) {
|
||||
tv64 = *tv;
|
||||
tv_ptr = &tv64;
|
||||
}
|
||||
|
||||
const uint64_t Result = ::settimeofday(tv_ptr, tz);
|
||||
SYSCALL_ERRNO();
|
||||
});
|
||||
|
||||
REGISTER_SYSCALL_IMPL_X32(nanosleep, [](FEXCore::Core::CpuStateFrame *Frame, const timespec32 *req, timespec32 *rem) -> uint64_t {
|
||||
struct timespec rem64{};
|
||||
struct timespec *rem64_ptr{};
|
||||
|
||||
Reference in new issue
Block a user