diff options
Diffstat (limited to 'src/core/host_timing.cpp')
| -rw-r--r-- | src/core/host_timing.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/host_timing.cpp b/src/core/host_timing.cpp index 4ccf7c6c1..c734a118e 100644 --- a/src/core/host_timing.cpp +++ b/src/core/host_timing.cpp | |||
| @@ -72,7 +72,8 @@ void CoreTiming::SyncPause(bool is_paused) { | |||
| 72 | } | 72 | } |
| 73 | Pause(is_paused); | 73 | Pause(is_paused); |
| 74 | event.Set(); | 74 | event.Set(); |
| 75 | while (paused_set != is_paused); | 75 | while (paused_set != is_paused) |
| 76 | ; | ||
| 76 | } | 77 | } |
| 77 | 78 | ||
| 78 | bool CoreTiming::IsRunning() { | 79 | bool CoreTiming::IsRunning() { |
| @@ -158,7 +159,8 @@ void CoreTiming::Advance() { | |||
| 158 | } | 159 | } |
| 159 | 160 | ||
| 160 | if (!event_queue.empty()) { | 161 | if (!event_queue.empty()) { |
| 161 | std::chrono::nanoseconds next_time = std::chrono::nanoseconds(event_queue.front().time - global_timer); | 162 | std::chrono::nanoseconds next_time = |
| 163 | std::chrono::nanoseconds(event_queue.front().time - global_timer); | ||
| 162 | basic_lock.unlock(); | 164 | basic_lock.unlock(); |
| 163 | event.WaitFor(next_time); | 165 | event.WaitFor(next_time); |
| 164 | } else { | 166 | } else { |
| @@ -181,4 +183,4 @@ std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const { | |||
| 181 | return clock->GetTimeUS(); | 183 | return clock->GetTimeUS(); |
| 182 | } | 184 | } |
| 183 | 185 | ||
| 184 | } // namespace Core::Timing | 186 | } // namespace Core::HostTiming |