Fix socket poll and handling in windows (#6166)
* Fix socket poll and handling in windows * Fix clang * Add guest timing adjust * Use platform independent time fetch * Use proper type in time_point * Fix ambiguous function call * Do suggestions * Take cpu_clock_scale into account in tick adjust
This commit is contained in:
parent
a2daef2985
commit
4d684174e0
4 changed files with 227 additions and 52 deletions
|
@ -203,6 +203,11 @@ public:
|
|||
|
||||
void MoveEvents();
|
||||
|
||||
// Use these two functions to adjust the guest system tick on host blocking operations, so
|
||||
// that the guest can tell how much time passed during the host call.
|
||||
u32 StartAdjust();
|
||||
void EndAdjust(u32 start_adjust_handle);
|
||||
|
||||
private:
|
||||
friend class Timing;
|
||||
// The queue is a min-heap using std::make_heap/push_heap/pop_heap.
|
||||
|
@ -227,6 +232,9 @@ public:
|
|||
s64 downcount = MAX_SLICE_LENGTH;
|
||||
s64 executed_ticks = 0;
|
||||
u64 idled_cycles = 0;
|
||||
|
||||
std::chrono::time_point<std::chrono::steady_clock> adjust_value_last;
|
||||
u32 adjust_value_curr_handle = 0;
|
||||
// Stores a scaling for the internal clockspeed. Changing this number results in
|
||||
// under/overclocking the guest cpu
|
||||
double cpu_clock_scale = 1.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue