Reference documentation for deal.II version 9.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
Timer::ClockMeasurements< clock_type_ > Struct Template Reference
Inheritance diagram for Timer::ClockMeasurements< clock_type_ >:
[legend]

Public Types

typedef clock_type_ clock_type
 
typedef clock_type::time_point time_point_type
 
typedef clock_type::duration duration_type
 

Public Member Functions

 ClockMeasurements ()
 
void reset ()
 

Public Attributes

time_point_type current_lap_start_time
 
duration_type accumulated_time
 
duration_type last_lap_time
 

Detailed Description

template<class clock_type_>
struct Timer::ClockMeasurements< clock_type_ >

The Timer class stores timing information for two different clocks: a wall clock and a CPU usage clock. Since the logic for handling both clocks is, in most places, identical, we collect the relevant measurements for each clock into this struct.

Template Parameters
clock_type_The type of the clock whose measurements are being stored. This class should conform to the usual clock interface expected by std::chrono (i.e., the correct typedefs and a static now() method).

Definition at line 303 of file timer.h.

Member Typedef Documentation

◆ clock_type

template<class clock_type_>
typedef clock_type_ Timer::ClockMeasurements< clock_type_ >::clock_type

Store the clock type.

Definition at line 308 of file timer.h.

◆ time_point_type

template<class clock_type_>
typedef clock_type::time_point Timer::ClockMeasurements< clock_type_ >::time_point_type

The time point type of the provided clock.

Definition at line 313 of file timer.h.

◆ duration_type

template<class clock_type_>
typedef clock_type::duration Timer::ClockMeasurements< clock_type_ >::duration_type

The duration type of the provided clock.

Definition at line 318 of file timer.h.

Constructor & Destructor Documentation

◆ ClockMeasurements()

template<typename clock_type_ >
Timer::ClockMeasurements< clock_type_ >::ClockMeasurements ( )

Constructor. Sets current_lap_start_time to the current clock time and the durations to zero.

Definition at line 133 of file timer.cc.

Member Function Documentation

◆ reset()

template<typename clock_type_ >
void Timer::ClockMeasurements< clock_type_ >::reset ( )

Reset the clock by setting current_lap_start_time to the current clock time and the durations to zero.

Definition at line 144 of file timer.cc.

Member Data Documentation

◆ current_lap_start_time

template<class clock_type_>
time_point_type Timer::ClockMeasurements< clock_type_ >::current_lap_start_time

The time point corresponding to the start of the current lap. This is obtained by calling clock_type::now().

Definition at line 324 of file timer.h.

◆ accumulated_time

template<class clock_type_>
duration_type Timer::ClockMeasurements< clock_type_ >::accumulated_time

The accumulated time over several laps.

Definition at line 329 of file timer.h.

◆ last_lap_time

template<class clock_type_>
duration_type Timer::ClockMeasurements< clock_type_ >::last_lap_time

The duration of the last lap.

Definition at line 334 of file timer.h.


The documentation for this struct was generated from the following files: