Commit graph

11 commits

Author SHA1 Message Date
Morph
bff1453282 core_timing: Use higher precision sleeps on Windows
The precision of sleep_for and wait_for is limited to 1-1.5ms on Windows.
Using SleepForOneTick() allows us to sleep for exactly one interval of the current timer resolution.
This allows us to take advantage of systems that have a timer resolution of 0.5ms to reduce CPU overhead in the event loop.
2023-03-05 02:36:31 -05:00
Morph
99ceb03a1c general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-04-23 05:55:32 -04:00
Morph
6267110b69 common: wall_clock: Check precision against the emulated CPU and CNTFRQ
In addition to requiring nanosecond precision, using the native clock requires that the hardware TSC has a precision greater than the emulated CPU and its clock counter.
2022-01-30 12:57:23 -05:00
Morph
4e766280c4 common: wall_clock: Utilize constants for ms, us, and ns ratios 2022-01-30 12:36:56 -05:00
Lioncash
1ea6bdef05 audio_core: Make shadowing and unused parameters errors
Moves the audio code closer to enabling warnings as errors in general.
2020-12-03 00:54:31 -05:00
ReinUsesLisp
771a9c21cc common/wall_clock: Add virtual destructors
From -fsanitize=address, this code wasn't calling the proper destructor.
Adding virtual destructors for each inherited class and the base class
fixes this bug.

While we are at it, mark the functions as final.
2020-09-30 02:53:34 -03:00
Lioncash
df72480395 common: Make use of [[nodiscard]] where applicable
Now that clang-format makes [[nodiscard]] attributes format sensibly, we
can apply them to several functions within the common library to allow
the compiler to complain about any misuses of the functions.
2020-08-15 17:17:52 -04:00
Fernando Sahmkow
18dcb09342 HostTiming: Pause the hardware clock on pause. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow
1bd706344e Common/Tests: Clang Format. 2020-06-18 16:29:19 -04:00
Fernando Sahmkow
e3524d1142 Common: Refactor & Document Wall clock. 2020-06-18 16:29:18 -04:00
Fernando Sahmkow
234b5ff6a9 Common: Implement WallClock Interface and implement a native clock for x64 2020-06-18 16:29:17 -04:00