Codechange: switch all video drivers to std::chrono for keeping time
On all OSes we tested the std::chrono::steady_clock is of a high enough resolution to do millisecond measurements, which is all we need. By accident, this fixes a Win32 driver bug, where we would never hit our targets, as the resolution of the clock was too low to do accurate millisecond measurements with (it was ~16ms resolution instead).
This commit is contained in:
committed by
Patric Stout
parent
d437445c67
commit
25f6851ca1
@@ -62,9 +62,9 @@ private:
|
||||
*/
|
||||
bool edit_box_focused;
|
||||
|
||||
uint32 cur_ticks;
|
||||
uint32 last_cur_ticks;
|
||||
uint32 next_tick;
|
||||
std::chrono::steady_clock::time_point cur_ticks;
|
||||
std::chrono::steady_clock::time_point last_cur_ticks;
|
||||
std::chrono::steady_clock::time_point next_tick;
|
||||
|
||||
int startup_display;
|
||||
std::thread draw_thread;
|
||||
|
||||
Reference in New Issue
Block a user