Reference documentation for deal.II version Git 35565f205e 2019-09-24 08:33:37 +0200
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
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

using clock_type = clock_type_
 
using time_point_type = typename clock_type::time_point
 
using duration_type = typename clock_type::duration
 

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 alias and a static now() method).

Definition at line 320 of file timer.h.

Member Typedef Documentation

◆ clock_type

template<class clock_type_>
using Timer::ClockMeasurements< clock_type_ >::clock_type = clock_type_

Store the clock type.

Definition at line 325 of file timer.h.

◆ time_point_type

template<class clock_type_>
using Timer::ClockMeasurements< clock_type_ >::time_point_type = typename clock_type::time_point

The time point type of the provided clock.

Definition at line 330 of file timer.h.

◆ duration_type

template<class clock_type_>
using Timer::ClockMeasurements< clock_type_ >::duration_type = typename clock_type::duration

The duration type of the provided clock.

Definition at line 335 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 139 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 149 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 341 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 346 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 351 of file timer.h.


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