summaryrefslogtreecommitdiffstats
path: root/vbench/src/vbench/core/timer.h
blob: 2b4624cc5979a6540dde9dc3326ce3d3abcdfc2b (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
24
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/fastos/time.h>

namespace vbench {

/**
 * Simple utility class used to handle low-level time sampling.
 **/
class Timer
{
private:
    FastOS_Time _time;

public:
    Timer();
    void reset();
    double sample() const;
};

} // namespace vbench