14 #include <type_traits> 18 template <
typename TClock = std::chrono::high_resolution_clock,
19 typename TDuration = std::chrono::microseconds>
29 typename clock_type::time_point
start_;
54 std::false_type is_timer_impl(...);
55 template <
typename T,
typename U>
56 std::true_type is_timer_impl(
Timer<T, U> const volatile&);
59 constexpr
bool is_timer_v =
60 std::is_same_v<decltype(is_timer_impl(std::declval<T&>())), std::true_type>;
TClock clock_type
Default clock used for time measurement.
TDuration duration_type
Internal resolution of the time measurement.
void startTimer()
Start the timer.
duration_type timeDiff_
Measured runtime of the function.
`, since they are used everywhere as integral part of the framework.
clock_type::time_point start_
Startpoint of time measurement.
void stopTimer()
Stop the timer.
duration_type getTime() const
Returns the runtime of the last call to the wrapped function.