deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
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_ >:
Inheritance graph
[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 251 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 256 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 261 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 266 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 139 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 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 272 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 277 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 282 of file timer.h.


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