[Base] Clock state now unaltered by threading.
- Removed tick and time values from ThreadSavedState. - Removed affiliated get/set code from Save and Restore. - Removed dangerous SetGuestTickCount method.
This commit is contained in:
@@ -126,13 +126,6 @@ uint32_t Clock::QueryGuestUptimeMillis() {
|
||||
std::numeric_limits<uint32_t>::max()));
|
||||
}
|
||||
|
||||
void Clock::SetGuestTickCount(uint64_t tick_count) {
|
||||
std::lock_guard<std::mutex> lock(tick_mutex_);
|
||||
|
||||
last_host_tick_count_ = Clock::QueryHostTickCount();
|
||||
last_guest_tick_count_ = tick_count;
|
||||
}
|
||||
|
||||
void Clock::SetGuestSystemTime(uint64_t system_time) {
|
||||
// Query the filetime offset to calculate a new base time.
|
||||
auto guest_system_time_offset = QueryGuestSystemTimeOffset();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
||||
* Copyright 2019 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
@@ -47,9 +47,7 @@ class Clock {
|
||||
// Queries the milliseconds since the guest began, accounting for scaling.
|
||||
static uint32_t QueryGuestUptimeMillis();
|
||||
|
||||
// Sets the guest tick count for the current thread.
|
||||
static void SetGuestTickCount(uint64_t tick_count);
|
||||
// Sets the system time for the current thread.
|
||||
// Sets the system time of the guest.
|
||||
static void SetGuestSystemTime(uint64_t system_time);
|
||||
|
||||
// Scales a time duration in milliseconds, from guest time.
|
||||
|
||||
Reference in New Issue
Block a user