1 | //===-- Timer.h -------------------------------------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H |
10 | #define LLVM_LIBC_TEST_SRC_MATH_PERFORMACE_TESTING_TIMER_H |
11 | |
12 | #include "src/__support/macros/config.h" |
13 | #include <stdint.h> |
14 | |
15 | namespace LIBC_NAMESPACE_DECL { |
16 | namespace testing { |
17 | |
18 | class Timer { |
19 | void *Impl; |
20 | |
21 | public: |
22 | Timer(); |
23 | ~Timer(); |
24 | |
25 | void start(); |
26 | void stop(); |
27 | |
28 | uint64_t nanoseconds() const; |
29 | }; |
30 | |
31 | } // namespace testing |
32 | } // namespace LIBC_NAMESPACE_DECL |
33 | |
34 | #endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H |
35 | |