Reference documentation for deal.II version 9.0.0
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
CPUClock Struct Reference

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

Public Types

typedef std::chrono::microseconds duration
 
typedef duration::rep rep
 
typedef duration::period period
 
typedef std::chrono::time_point< CPUClock, durationtime_point
 

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 37 of file timer.h.

Member Typedef Documentation

◆ duration

typedef std::chrono::microseconds CPUClock::duration

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 44 of file timer.h.

◆ rep

typedef duration::rep CPUClock::rep

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

Definition at line 49 of file timer.h.

◆ period

typedef duration::period CPUClock::period

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

Definition at line 54 of file timer.h.

◆ time_point

typedef std::chrono::time_point<CPUClock, duration> CPUClock::time_point

Time point type.

Definition at line 59 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 106 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 64 of file timer.h.


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