2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #4732 from ReinUsesLisp/wall-clock-destr

common/wall_clock: Add virtual destructors
This commit is contained in:
LC 2020-09-30 05:53:12 -04:00 committed by GitHub
commit cb56eaee41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -15,7 +15,7 @@ namespace Common {
using base_timer = std::chrono::steady_clock; using base_timer = std::chrono::steady_clock;
using base_time_point = std::chrono::time_point<base_timer>; using base_time_point = std::chrono::time_point<base_timer>;
class StandardWallClock : public WallClock { class StandardWallClock final : public WallClock {
public: public:
StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency) StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency)
: WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) { : WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) {

View file

@ -13,6 +13,8 @@ namespace Common {
class WallClock { class WallClock {
public: public:
virtual ~WallClock() = default;
/// Returns current wall time in nanoseconds /// Returns current wall time in nanoseconds
[[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0; [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0;

View file

@ -12,7 +12,7 @@
namespace Common { namespace Common {
namespace X64 { namespace X64 {
class NativeClock : public WallClock { class NativeClock final : public WallClock {
public: public:
NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency); NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency);