diff options
author | Lioncash <mathew1800@gmail.com> | 2020-07-16 01:14:21 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-07-16 01:41:22 +0200 |
commit | bef1844a51a37c1c8dc531e67069ef00821ffa9c (patch) | |
tree | 2e46f404c3f0baf1b854e1bea916c19469fe424a /src/core/core_timing.h | |
parent | core_timing: Make use of std::chrono with ScheduleEvent (diff) | |
download | yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.gz yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.bz2 yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.lz yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.xz yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.tar.zst yuzu-bef1844a51a37c1c8dc531e67069ef00821ffa9c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core_timing.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index 9b9f18daf..a21356a08 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -17,14 +17,12 @@ #include "common/common_types.h" #include "common/spin_lock.h" #include "common/thread.h" -#include "common/threadsafe_queue.h" #include "common/wall_clock.h" -#include "core/hardware_properties.h" namespace Core::Timing { /// A callback that may be scheduled for a particular core timing event. -using TimedCallback = std::function<void(u64 userdata, s64 cycles_late)>; +using TimedCallback = std::function<void(u64 userdata, std::chrono::nanoseconds ns_late)>; /// Contains the characteristics of a particular event. struct EventType { @@ -42,12 +40,12 @@ struct EventType { * in main CPU clock cycles. * * To schedule an event, you first have to register its type. This is where you pass in the - * callback. You then schedule events using the type id you get back. + * callback. You then schedule events using the type ID you get back. * - * The int cyclesLate that the callbacks get is how many cycles late it was. + * The s64 ns_late that the callbacks get is how many ns late it was. * So to schedule a new event on a regular basis: * inside callback: - * ScheduleEvent(periodInCycles - cyclesLate, callback, "whatever") + * ScheduleEvent(period_in_ns - ns_late, callback, "whatever") */ class CoreTiming { public: |