mirror of
https://github.com/stenzek/duckstation.git
synced 2026-11-01 03:56:43 +01:00
Misc: Use C++23 elifdef/elifndef
And drop macros for platforms not supported in the public repo.
This commit is contained in:
53 files changed
+187
-749
No files matched your search
@@ -374,7 +374,7 @@ void Timer::HybridSleep(std::uint64_t ns, std::uint64_t min_sleep_time)
|
||||
|
||||
void Timer::NanoSleep(std::uint64_t ns)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
#ifdef _WIN32
|
||||
HANDLE timer = GetSleepTimer();
|
||||
if (timer)
|
||||
{
|
||||
@@ -389,9 +389,6 @@ void Timer::NanoSleep(std::uint64_t ns)
|
||||
{
|
||||
Sleep(static_cast<std::uint32_t>(ns / 1000000));
|
||||
}
|
||||
#elif defined(__ANDROID__)
|
||||
// Round down to the next millisecond.
|
||||
usleep(static_cast<useconds_t>((ns / 1000000) * 1000));
|
||||
#else
|
||||
const struct timespec ts = {static_cast<long>(ns / 1000000000ULL), static_cast<long>(ns % 1000000000ULL)};
|
||||
nanosleep(&ts, nullptr);
|
||||
|
||||
Reference in new issue
Block a user