blob: 119d6df76d550e05208d627700801a1f6ab56acc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <chrono>
namespace vbench {
/**
* Simple utility class used to handle low-level time sampling.
**/
class Timer
{
private:
using clock = std::chrono::steady_clock;
clock::time_point _zero;
public:
Timer();
void reset();
double sample() const;
};
} // namespace vbench
|