casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::C11Timer Class Reference

#include <C11Timer.h>

Public Member Functions

 C11Timer ()
 casacore::Timer based on C++11 chrono library More...
 
 ~C11Timer ()
 
casacore::Double meanDuration () const
 return mean duration, in seconds, of all start/stop cycles More...
 
casacore::Double duration () const
 duration in seconds of most recent start/stop cycle More...
 
casacore::uInt nCycles () const
 number of start/stop cycles More...
 
void start ()
 (re)start the timer More...
 
void stop ()
 stop the timer More...
 
casacore::Double totalDuration () const
 total duration in seconds, sum of all start/stop cycles doesn't include the duration of the current cycle if the timer is currently running More...
 

Private Attributes

std::chrono::steady_clock::time_point _start
 
std::chrono::duration< double > _duration
 
std::chrono::duration< double > _totalDuration
 
casacore::uInt _nCycles
 

Detailed Description

Definition at line 10 of file C11Timer.h.

Constructor & Destructor Documentation

casa::C11Timer::C11Timer ( )

casacore::Timer based on C++11 chrono library

Etymology

casacore::Timer based on C++11 chrono library

Synopsis

casacore::Timer based on C++11 chrono librarycreate the timer but do not start it.

casa::C11Timer::~C11Timer ( )

Member Function Documentation

casacore::Double casa::C11Timer::duration ( ) const

duration in seconds of most recent start/stop cycle

casacore::Double casa::C11Timer::meanDuration ( ) const

return mean duration, in seconds, of all start/stop cycles

casacore::uInt casa::C11Timer::nCycles ( ) const

number of start/stop cycles

void casa::C11Timer::start ( )

(re)start the timer

void casa::C11Timer::stop ( )

stop the timer

casacore::Double casa::C11Timer::totalDuration ( ) const

total duration in seconds, sum of all start/stop cycles doesn't include the duration of the current cycle if the timer is currently running

Member Data Documentation

std::chrono::duration<double> casa::C11Timer::_duration
private

Definition at line 57 of file C11Timer.h.

casacore::uInt casa::C11Timer::_nCycles
private

Definition at line 58 of file C11Timer.h.

std::chrono::steady_clock::time_point casa::C11Timer::_start
private

Definition at line 56 of file C11Timer.h.

std::chrono::duration<double> casa::C11Timer::_totalDuration
private

Definition at line 57 of file C11Timer.h.


The documentation for this class was generated from the following file: