diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-25 12:28:55 -0400 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 11:35:10 -0400 |
commit | 18dcb0934217628711c5b1d22fd6d7635e683e3f (patch) | |
tree | 426f78eb11aa79e0d1c7470b966fbae8ea8e3e6d /src/core/core_timing.cpp | |
parent | 6bf137a0e81fa3fae030687f10ac2c1e12d824ff (diff) |
HostTiming: Pause the hardware clock on pause.
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r-- | src/core/core_timing.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index cc32a853b9..5a7abcfca9 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -77,6 +77,9 @@ void CoreTiming::SyncPause(bool is_paused) { return; } Pause(is_paused); + if (!is_paused) { + pause_event.Set(); + } event.Set(); while (paused_set != is_paused) ; @@ -197,6 +200,9 @@ void CoreTiming::ThreadLoop() { wait_set = false; } paused_set = true; + clock->Pause(true); + pause_event.Wait(); + clock->Pause(false); } } |