ewmscp  ..
Public Member Functions | Private Attributes | List of all members
timeSpan Class Reference

Public Member Functions

 timeSpan ()
 
void update (clock_type::time_point aStart, clock_type::time_point aStop)
 
void update (clock_type::time_point aTime)
 
std::chrono::duration< double > span ()
 

Private Attributes

clock_type::time_point start
 
clock_type::time_point stop
 

Detailed Description

Definition at line 429 of file fileopstest.cpp.

Constructor & Destructor Documentation

◆ timeSpan()

timeSpan::timeSpan ( )
inline

Definition at line 433 of file fileopstest.cpp.

433  : start(clock_type::time_point::max()),
434  stop(clock_type::time_point::min()) {
435  }

Member Function Documentation

◆ span()

std::chrono::duration<double> timeSpan::span ( )
inline

Definition at line 455 of file fileopstest.cpp.

455  {
456  return std::chrono::duration_cast<std::chrono::duration<double>>(stop - start);
457  }

References start, and stop.

Referenced by collectStats().

Here is the caller graph for this function:

◆ update() [1/2]

void timeSpan::update ( clock_type::time_point  aStart,
clock_type::time_point  aStop 
)
inline

Definition at line 436 of file fileopstest.cpp.

437  {
438  if (aStart < start) {
439  start = aStart;
440  }
441 
442  if (aStop > stop) {
443  stop = aStop;
444  }
445  }

References start, and stop.

Referenced by collectStats().

Here is the caller graph for this function:

◆ update() [2/2]

void timeSpan::update ( clock_type::time_point  aTime)
inline

Definition at line 446 of file fileopstest.cpp.

446  {
447  if (aTime < start) {
448  start = aTime;
449  }
450 
451  if (aTime > stop) {
452  stop = aTime;
453  }
454  }

References start, and stop.

Member Data Documentation

◆ start

clock_type::time_point timeSpan::start
private

Definition at line 430 of file fileopstest.cpp.

Referenced by span(), and update().

◆ stop

clock_type::time_point timeSpan::stop
private

Definition at line 431 of file fileopstest.cpp.

Referenced by span(), and update().


The documentation for this class was generated from the following file:
timeSpan::start
clock_type::time_point start
Definition: fileopstest.cpp:430
timeSpan::stop
clock_type::time_point stop
Definition: fileopstest.cpp:431