(nw) possible fix for MT 07275 [hap]

This commit is contained in:
Robbbert 2019-04-19 18:38:13 +10:00
parent 379b9e6c92
commit 6d3eddd819

View File

@ -200,7 +200,12 @@ osd_ticks_t osd_ticks_per_second(void)
void osd_sleep(osd_ticks_t duration)
{
#ifdef WIN32
// sleep_for appears to oversleep on Windows with gcc 8
Sleep(duration / (osd_ticks_per_second() / 1000));
#else
std::this_thread::sleep_for(std::chrono::high_resolution_clock::duration(duration));
#endif
}