Merge #11562: bench: use std::chrono rather than gettimeofday
commit5776582b7f3efc9af1c35b68a51bd2c83b848a32
authorWladimir J. van der Laan <laanwj@gmail.com>
Wed, 8 Nov 2017 07:32:54 +0000 (8 08:32 +0100)
committerWladimir J. van der Laan <laanwj@gmail.com>
Wed, 8 Nov 2017 07:33:07 +0000 (8 08:33 +0100)
tree91db60d78f0bab96dee2bec752f39c7531039810
parentdd561667cb7ccbbfed3134b05a565971ef6f5873
parent24a0bddf4ae13d8f1fa0436a547de67dcf6d4f2a
Merge #11562: bench: use std::chrono rather than gettimeofday

24a0bdd bench: prefer a steady clock if the resolution is no worse (Cory Fields)
c515d26 bench: switch to std::chrono for time measurements (Cory Fields)

Pull request description:

  gettimeofday has portability issues, see for example #11558.

  Regardless of large-scale clock refactors in the future, I think it's fine for bench to just use std::chrono itself.

  Note that this may slightly improve bench accuracy and changes the display from tiny floats to nanosecond counts instead.

Tree-SHA512: 122355456d01ec6cfcf6867991715cf3a95eabbf5a4f2adc26a059b50382ffb318b7639cdd575197fc4ee5be8b967c0404f1f920d6f5bd4ddd0bd63b5e5c5632