line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
// Copyright Catch2 Authors |
3
|
|
|
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. |
4
|
|
|
|
|
|
|
// (See accompanying file LICENSE_1_0.txt or copy at |
5
|
|
|
|
|
|
|
// https://www.boost.org/LICENSE_1_0.txt) |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
// SPDX-License-Identifier: BSL-1.0 |
8
|
|
|
|
|
|
|
// Adapted from donated nonius code. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#ifndef CATCH_CLOCK_HPP_INCLUDED |
11
|
|
|
|
|
|
|
#define CATCH_CLOCK_HPP_INCLUDED |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#include |
14
|
|
|
|
|
|
|
#include |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
namespace Catch { |
17
|
|
|
|
|
|
|
namespace Benchmark { |
18
|
|
|
|
|
|
|
template |
19
|
|
|
|
|
|
|
using ClockDuration = typename Clock::duration; |
20
|
|
|
|
|
|
|
template |
21
|
|
|
|
|
|
|
using FloatDuration = std::chrono::duration; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
template |
24
|
|
|
|
|
|
|
using TimePoint = typename Clock::time_point; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
using default_clock = std::chrono::steady_clock; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
template |
29
|
|
|
|
|
|
|
struct now { |
30
|
0
|
|
|
|
|
|
TimePoint operator()() const { |
31
|
0
|
|
|
|
|
|
return Clock::now(); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
using fp_seconds = std::chrono::duration>; |
36
|
|
|
|
|
|
|
} // namespace Benchmark |
37
|
|
|
|
|
|
|
} // namespace Catch |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#endif // CATCH_CLOCK_HPP_INCLUDED |