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 <stdint.h>
13
14namespace LIBC_NAMESPACE {
15namespace testing {
16
17class Timer {
18 void *Impl;
19
20public:
21 Timer();
22 ~Timer();
23
24 void start();
25 void stop();
26
27 uint64_t nanoseconds() const;
28};
29
30} // namespace testing
31} // namespace LIBC_NAMESPACE
32
33#endif // LLVM_LIBC_TEST_SRC_MATH_PERFORMANCE_TESTING_TIMER_H
34

source code of libc/test/src/math/performance_testing/Timer.h