Reference documentation for deal.II version GIT relicensing-399-g79d89019c5 2024-04-16 15:00:02+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 | 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 36 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 43 of file timer.h.

◆ rep

using CPUClock::rep = duration::rep

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

Definition at line 48 of file timer.h.

◆ period

using CPUClock::period = duration::period

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

Definition at line 53 of file timer.h.

◆ time_point

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

Time point type.

Definition at line 58 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 63 of file timer.h.


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