• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Created by Joachim on 16/04/2019.
3  *  Adapted from donated nonius code.
4  *
5  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
6  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  */
8 
9 // Timing
10 
11 #ifndef TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
12 #define TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
13 
14 #include "../catch_clock.hpp"
15 #include "catch_complete_invoke.hpp"
16 
17 #include <tuple>
18 #include <type_traits>
19 
20 namespace Catch {
21     namespace Benchmark {
22         template <typename Duration, typename Result>
23         struct Timing {
24             Duration elapsed;
25             Result result;
26             int iterations;
27         };
28         template <typename Clock, typename Sig>
29         using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<Detail::ResultOf_t<Sig>>>;
30     } // namespace Benchmark
31 } // namespace Catch
32 
33 #endif // TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
34