ryujinx/src/Ryujinx.Common
riperiperi 1be668e68a
HLE: Add OS-specific precise sleep methods to reduce spinwaiting (#5948)
* feat: add nanosleep for linux and macos

* Add Windows 0.5ms sleep

- Imprecise waits for longer waits with clock alignment
- 1/4 the spin time on vsync timer

* Remove old experiment

* Fix event leak

* Tweaking for MacOS

* Linux tweaks, nanosleep vsync improvement

* Fix overbias

* Cleanup

* Fix realignment

* Add some docs and some cleanup

NanosleepPool needs more, Nanosleep has some benchmark code that needs removed.

* Rename "Microsleep" to "PreciseSleep"

Might have been confused with "microseconds", which no measurement is performed in.

* Remove nanosleep measurement

* Remove unused debug logging

* Nanosleep Pool Documentation

* More cleanup

* Whitespace

* Formatting

* Address Feedback

* Allow SleepUntilTimePoint to take EventWaitHandle

* Remove `_chrono` stopwatch in SurfaceFlinger

* Move spinwaiting logic to PreciseSleepHelper

Technically, these achieve different things, but having them here makes them easier to reuse or tune.
2023-11-30 15:39:42 -03:00
..
Collections GPU: Don't create tracking handles for buffer textures (#5727) 2023-09-26 12:37:10 -03:00
Configuration Fix macOS Path (#5941) 2023-11-16 16:09:15 -03:00
Extensions [Ryujinx.Common] Address dotnet-format issues (#5358) 2023-06-28 18:41:38 +02:00
GraphicsDriver Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Logging Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Memory HLE: Fix Mii crc generation and minor issues (#5766) 2023-10-06 19:23:39 -03:00
Pools [Ryujinx.Common] Address dotnet-format issues (#5358) 2023-06-28 18:41:38 +02:00
PreciseSleep HLE: Add OS-specific precise sleep methods to reduce spinwaiting (#5948) 2023-11-30 15:39:42 -03:00
SystemInterop "static readonly" constants should be "const" instead (#5560) 2023-08-13 19:07:57 -03:00
Utilities Add ldn_mitm as a network client for LDN (#5656) 2023-10-26 00:32:13 +02:00
AsyncWorkQueue.cs Add workflow to automatically check code style issues for PRs (#4670) 2023-07-24 18:35:04 +02:00
Hash128.cs [Ryujinx.Common] Address dotnet-format issues (#5358) 2023-06-28 18:41:38 +02:00
PerformanceCounter.cs [Ryujinx.Common] Address dotnet-format issues (#5358) 2023-06-28 18:41:38 +02:00
ReactiveObject.cs Replace ReaderWriterLock with ReaderWriterLockSlim (#5785) 2023-10-12 18:11:15 +02:00
ReferenceEqualityComparer.cs Move solution and projects to src 2023-04-27 23:51:14 +02:00
ReleaseInformation.cs [Ryujinx.Common] Address dotnet-format issues (#5358) 2023-06-28 18:41:38 +02:00
Ryujinx.Common.csproj Migrate to .NET 8 (#5887) 2023-11-15 17:41:31 +01:00
XXHash128.cs [Ryujinx.Common] Address dotnet-format issues (#5358) 2023-06-28 18:41:38 +02:00