μHAL (v2.7.9)
Part of the IPbus software repository
Public Member Functions | Private Attributes | List of all members
uhal::tests::Timer Class Reference

A very simple timer. More...

#include <uhal/tests/tools.hpp>

Public Member Functions

 Timer ()
 
double elapsedSeconds ()
 Returns number of elapsed seconds since the timer was instantiated. More...
 

Private Attributes

timeval m_start
 

Detailed Description

A very simple timer.

Definition at line 73 of file tools.hpp.

Constructor & Destructor Documentation

◆ Timer()

uhal::tests::Timer::Timer ( )
inline

Definition at line 77 of file tools.hpp.

References m_start.

Member Function Documentation

◆ elapsedSeconds()

double uhal::tests::Timer::elapsedSeconds ( )
inline

Returns number of elapsed seconds since the timer was instantiated.

Definition at line 83 of file tools.hpp.

References m_start, uhal::sec, and uhal::usec.

Referenced by uhal::tests::measureFileReadLatency(), uhal::tests::measureFileWriteLatency(), uhal::tests::measureReadLatency(), and uhal::tests::measureWriteLatency().

Member Data Documentation

◆ m_start

timeval uhal::tests::Timer::m_start
private

Definition at line 93 of file tools.hpp.

Referenced by elapsedSeconds(), and Timer().


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