Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:02:48

0001 
0002 //              Copyright Catch2 Authors
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //   (See accompanying file LICENSE.txt or copy at
0005 //        https://www.boost.org/LICENSE_1_0.txt)
0006 
0007 // SPDX-License-Identifier: BSL-1.0
0008 // Adapted from donated nonius code.
0009 
0010 #ifndef CATCH_TIMING_HPP_INCLUDED
0011 #define CATCH_TIMING_HPP_INCLUDED
0012 
0013 #include <catch2/benchmark/catch_clock.hpp>
0014 #include <catch2/benchmark/detail/catch_complete_invoke.hpp>
0015 
0016 #include <type_traits>
0017 
0018 namespace Catch {
0019     namespace Benchmark {
0020         template <typename Duration, typename Result>
0021         struct Timing {
0022             Duration elapsed;
0023             Result result;
0024             int iterations;
0025         };
0026         template <typename Clock, typename Func, typename... Args>
0027         using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>;
0028     } // namespace Benchmark
0029 } // namespace Catch
0030 
0031 #endif // CATCH_TIMING_HPP_INCLUDED