Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
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 254 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 259 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 264 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 269 of file timer.h.

Constructor & Destructor Documentation

◆ ClockMeasurements()

template<class 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 140 of file timer.cc.

Member Function Documentation

◆ reset()

template<class 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 150 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 275 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 280 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 285 of file timer.h.


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