CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
corsika::Timer< TClock, TDuration > Class Template Reference

Public Member Functions

void startTimer ()
 Start the timer.
 
void stopTimer ()
 Stop the timer.
 
duration_type getTime () const
 Returns the runtime of the last call to the wrapped function. More...
 

Protected Types

using clock_type = TClock
 Default clock used for time measurement.
 
using duration_type = TDuration
 Internal resolution of the time measurement.
 

Protected Attributes

clock_type::time_point start_
 Startpoint of time measurement.
 
duration_type timeDiff_
 Measured runtime of the function.
 

Detailed Description

template<typename TClock = std::chrono::high_resolution_clock, typename TDuration = std::chrono::microseconds>
class corsika::Timer< TClock, TDuration >

Definition at line 20 of file Timer.hpp.

Member Function Documentation

◆ getTime()

template<typename TClock = std::chrono::high_resolution_clock, typename TDuration = std::chrono::microseconds>
duration_type corsika::Timer< TClock, TDuration >::getTime ( ) const
inline

Returns the runtime of the last call to the wrapped function.

Returns
Returns the measured runtime of the wrapped function/functor in the unit given by TDuration

Definition at line 51 of file Timer.hpp.


The documentation for this class was generated from the following file: