Merge pull request #7499 from birarda/udt-fixes

fix an overflow in portable high resolution clock on windows
This commit is contained in:
Brad Hefta-Gaub 2016-03-30 10:54:00 -07:00
commit 699b3a9dd7

View file

@ -24,7 +24,7 @@ namespace {
win_high_resolution_clock::time_point win_high_resolution_clock::now() {
LARGE_INTEGER count;
QueryPerformanceCounter(&count);
return time_point(duration(count.QuadPart * static_cast<rep>(period::den) / g_Frequency));
return time_point(duration(static_cast<rep>((double) count.QuadPart * (double) period::den / (double)g_Frequency)));
}
#endif