mirror of
https://github.com/catchorg/Catch2.git
synced 2025-04-29 12:03:53 +00:00
This commit also strips the old copyright comment header in touched files, as those will also be replaced with a more standardized and machine-friendly version.
25 lines
723 B
C++
25 lines
723 B
C++
// Adapted from donated nonius code.
|
|
|
|
#ifndef CATCH_TIMING_HPP_INCLUDED
|
|
#define CATCH_TIMING_HPP_INCLUDED
|
|
|
|
#include <catch2/benchmark/catch_clock.hpp>
|
|
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
|
|
|
#include <type_traits>
|
|
|
|
namespace Catch {
|
|
namespace Benchmark {
|
|
template <typename Duration, typename Result>
|
|
struct Timing {
|
|
Duration elapsed;
|
|
Result result;
|
|
int iterations;
|
|
};
|
|
template <typename Clock, typename Func, typename... Args>
|
|
using TimingOf = Timing<ClockDuration<Clock>, Detail::CompleteType_t<FunctionReturnType<Func, Args...>>>;
|
|
} // namespace Benchmark
|
|
} // namespace Catch
|
|
|
|
#endif // CATCH_TIMING_HPP_INCLUDED
|