diff options
| author | Lioncash <mathew1800@gmail.com> | 2020-07-15 18:30:06 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2020-07-15 18:54:15 -0400 |
| commit | 8b50c660dfce50a07c2b2aa3c1b6b8642259a944 (patch) | |
| tree | 798b0427a660bf249311f3a13d96c6df69a6bcb5 /src/core/core_timing.h | |
| parent | 263200f982f1c8509450721cf5fa9d8639c198ef (diff) | |
core_timing: Make use of std::chrono with ScheduleEvent
Diffstat (limited to 'src/core/core_timing.h')
| -rw-r--r-- | src/core/core_timing.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index 72faaab64..9b9f18daf 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -62,7 +62,7 @@ public: /// CoreTiming begins at the boundary of timing slice -1. An initial call to Advance() is /// required to end slice - 1 and start slice 0 before the first cycle of code is executed. - void Initialize(std::function<void(void)>&& on_thread_init_); + void Initialize(std::function<void()>&& on_thread_init_); /// Tears down all timing related functionality. void Shutdown(); @@ -95,8 +95,8 @@ public: bool HasPendingEvents() const; /// Schedules an event in core timing - void ScheduleEvent(s64 ns_into_future, const std::shared_ptr<EventType>& event_type, - u64 userdata = 0); + void ScheduleEvent(std::chrono::nanoseconds ns_into_future, + const std::shared_ptr<EventType>& event_type, u64 userdata = 0); void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, u64 userdata); @@ -161,7 +161,7 @@ private: std::atomic<bool> wait_set{}; std::atomic<bool> shutting_down{}; std::atomic<bool> has_started{}; - std::function<void(void)> on_thread_init{}; + std::function<void()> on_thread_init{}; bool is_multicore{}; |
