Page MenuHomePhabricator

Bug fix for PR#43703
Needs ReviewPublic

Authored by mclow.lists on Oct 22 2019, 11:06 AM.

Details

Reviewers
EricWF
ldionne
Summary

https://PR43703 - std::steady_clock::now() frequently overflows on Windows

I'm putting this up for review because I'm not seeing an easy way to test this - and because I don't have a windows box handy.

Diff Detail

Event Timeline

mclow.lists created this revision.Oct 22 2019, 11:06 AM

I tested this patch, and it appears to fix the overflow problem.

(FWIW, I tested using https://gist.github.com/rprichard/bcff3b3fb0451207dc9f31ccbab938df on Wine and on Windows 10. For both targets, the performance counter frequency was 10MHz, so counter.QuadPart * nano::den had previously wrapped around about every 1845 seconds.)