aboutsummaryrefslogtreecommitdiffstats
path: root/vbench/src/vbench/core/timer.h
blob: 19ddbc9db9983a517fb6543c28bf01fbfd5a3bbb (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 2017 Yahoo Holdings. 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