Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
CPUClock Struct Reference

#include <deal.II/base/timer.h>

Public Types

using duration = std::chrono::microseconds
 
using rep = duration::rep
 
using period = duration::period
 
using time_point = std::chrono::time_point< CPUClock, duration >
 

Static Public Member Functions

static time_point now () noexcept
 

Static Public Attributes

static const bool is_steady = true
 

Detailed Description

A clock, compatible with the std::chrono notion of a clock, whose now() method returns a time point indicating the amount of CPU time that the current process has used.

Definition at line 38 of file timer.h.

Member Typedef Documentation

◆ duration

using CPUClock::duration = std::chrono::microseconds

Duration type. Windows measures CPU times, by default, in multiples of 1/64th of a second and POSIX uses microseconds, so go with microseconds for uniformity.

Definition at line 45 of file timer.h.

◆ rep

using CPUClock::rep = duration::rep

Signed integral type used to store the value returned by count().

Definition at line 50 of file timer.h.

◆ period

using CPUClock::period = duration::period

Ratio representing the length of a period (in seconds).

Definition at line 55 of file timer.h.

◆ time_point

using CPUClock::time_point = std::chrono::time_point<CPUClock, duration>

Time point type.

Definition at line 60 of file timer.h.

Member Function Documentation

◆ now()

CPUClock::time_point CPUClock::now ( )
staticnoexcept

Return the amount of CPU time that the current process has used. Unfortunately, this requires platform-specific calls, so this function returns 0 on platforms that are neither Windows nor POSIX.

Definition at line 110 of file timer.cc.

Member Data Documentation

◆ is_steady

const bool CPUClock::is_steady = true
static

Boolean indicating that the clock monotonically increases.

Definition at line 65 of file timer.h.


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