rpcs3/Utilities
plappermaul 925f2ce02f Use Linux timers for sleeps up to 1ms (#6697)
* Use Linux timers for sleeps up to 1ms (v3)
The current sleep timer implementation basically offers two variants. Either
wait the specified time exactly with a condition variable (as host) or use a
combination of it with a thread yielding busy loop afterwards (usleep timer).

While the second one is very precise it consumes CPU loops for each wait call
below 50us. Games like Bomberman Ultra spam 30us waits and the emulator hogs
low power CPUs. Switching to host mode reduces CPU consumption but gives a
~50us penalty for each wait call. Thus extending all sleeps by a factor of
more than two.

The following bugfix tries to improve the system timer for Linux by using
Linux native timers for small wait calls below 1ms. This has two effects.

- Host wait setting has much less wait overhead
- usleep wait setting produces lower CPU overhead
2019-10-09 20:03:34 +03:00
..
address_range.h
asm.h
AtomicPtr.h
BEType.h Improve to_se conversion template 2019-09-28 15:39:50 +03:00
bin_patch.cpp
bin_patch.h Implement std::bit_cast<> 2019-06-02 23:22:16 +03:00
bit_set.h
BitField.h
cfmt.h
cond.cpp
cond.h
Config.cpp
Config.h Input: move some pad handler logic to the parent class 2019-09-24 21:09:24 +02:00
CPUStats.h
CRC.h ds4: use controller calibration values for accel/gyro 2017-05-21 18:07:43 +03:00
date_time.h Screenshot function 2019-08-14 19:24:42 +02:00
dynamic_library.cpp
dynamic_library.h
event.h
File.cpp
File.h Make errors in Emu::Init verbose and don't crash 2019-09-24 05:01:00 +03:00
geometry.h
git-version-gen.cmd
GSL.h Update GSL and yaml-cpp submodules 2018-08-25 01:15:47 +03:00
hash.h
Interval.h
JIT.cpp
JIT.h
lockless.h
Log.cpp
Log.h
LUrlParser.cpp
LUrlParser.h
mutex.cpp
mutex.h
rXml.cpp
rXml.h
sema.cpp Use atomic wait in shared_mutex and semaphore 2019-07-29 03:04:55 +03:00
sema.h Implement waitable atomics 2019-07-29 03:04:55 +03:00
StrFmt.cpp
StrFmt.h
StrUtil.h Improve strcpy_trunc 2019-09-21 03:59:43 +03:00
sync.h atomic.hpp: use native semaphores on Windows 2019-09-24 05:01:00 +03:00
sysinfo.cpp
sysinfo.h Add experimental TSC frequency detection 2019-07-15 17:20:12 +03:00
Thread.cpp
Thread.h
Timer.h
typemap.h
types.h Tidy endianness support (se_t) implementation 2019-09-28 15:39:50 +03:00
version.cpp EXCEPTION macro removed 2016-08-08 19:19:32 +03:00
version.h
VirtualMemory.cpp
VirtualMemory.h