diff options
Diffstat (limited to 'vbench/src/vbench/core/timer.h')
-rw-r--r-- | vbench/src/vbench/core/timer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vbench/src/vbench/core/timer.h b/vbench/src/vbench/core/timer.h new file mode 100644 index 00000000000..e1b1132089b --- /dev/null +++ b/vbench/src/vbench/core/timer.h @@ -0,0 +1,22 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#pragma once + +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 + |