Use std::chrono::high_resolution_clock for folly::Benchmark
authorChristopher Dykes <cdykes@fb.com>
Wed, 1 Feb 2017 00:34:49 +0000 (16:34 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Feb 2017 00:47:59 +0000 (16:47 -0800)
commite0b75e77cc224d3caffbb717342873c858e893fe
tree3953fe9a6958b14cb5b789e72166b65d83cb0663
parentb6916a3a978b078b6275eb756762320d180eb09f
Use std::chrono::high_resolution_clock for folly::Benchmark

Summary: `clock_gettime(CLOCK_REALTIME)` is based on `std::system_clock` on Windows, but that only has a resolution that's the same as `FILETIME` (100s of nanoseconds), so modernize things and use `std::chrono::high_resolution_clock` which is intended for this purpose.

Reviewed By: yfeldblum

Differential Revision: D4476671

fbshipit-source-id: 3db1debc8f408f689b5c9fe1966a72b8dad4da93
folly/Benchmark.cpp
folly/Benchmark.h
folly/test/ProducerConsumerQueueBenchmark.cpp