Burton Li 88d85b6820 fix NowNanos overflow (#5062)
Summary:
The original implementation of WinEnvIO::NowNanos() has a constant data overflow by:
li.QuadPart *= std::nano::den;
As a result, the api provides a incorrect result.
e.g.:
li.QuadPart=13477844301545
std::nano::den=1e9

The fix uses pre-computed nano_seconds_per_period_ to present the nano seconds per performance counter period, in the case if nano::den is divisible by perf_counter_frequency_. Otherwise it falls back to use high_resolution_clock.
siying ajkr
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5062

Differential Revision: D14426842

Pulled By: anand1976

fbshipit-source-id: 127f1daf423dd4b30edd0dcf8ea0466f468bec12
2019-03-21 15:18:36 -07:00
..
2019-03-21 15:18:36 -07:00
2019-03-21 15:18:36 -07:00
2018-10-04 20:46:50 -07:00
2018-03-06 11:57:43 -08:00
2018-03-06 11:57:43 -08:00
2017-07-15 16:11:23 -07:00