Revert "tests: Use lowres_clock in time_it()"

This reverts commit e605a0368a.

lowres_clock is not updated when reactor is not running and this
variant of time_it() is not meant to be run in a rector.
This commit is contained in:
Tomasz Grabiec
2015-03-30 14:51:14 +02:00
parent 6b0ad02019
commit d21966ecbc

View File

@@ -19,10 +19,10 @@ void time_it(Func func, int iterations = 5) {
for (int i = 0; i < iterations; i++) {
auto start = clk::now();
auto end_at = lowres_clock::now() + std::chrono::seconds(1);
auto end_at = start + std::chrono::seconds(1);
uint64_t count = 0;
while (lowres_clock::now() < end_at) {
while (clk::now() < end_at) {
for (int i = 0; i < 10000; i++) { // amortize clock reading cost
func();
count++;