ReadFramework
rdf::Timer Class Reference

#include <Utils.h>

Public Member Functions

 Timer ()
 
QString getTotal () const
 
virtual QDataStream & put (QDataStream &s) const
 
QString stringifyTime (int ct) const
 
int elapsed () const
 
void start ()
 

Protected Attributes

QTime mTimer
 

Friends

DllCoreExport QDataStream & operator<< (QDataStream &s, const Timer &t)
 
DllCoreExport QDebug operator<< (QDebug d, const Timer &t)
 

Detailed Description

A small class which measures the time. This class is designed to measure the time of a method, especially intervals and the total time can be measured.

Constructor & Destructor Documentation

rdf::Timer::Timer ( )

Initializes the class and stops the clock.

Member Function Documentation

int rdf::Timer::elapsed ( ) const

Here is the caller graph for this function:

QString rdf::Timer::getTotal ( ) const

Returns a string with the total time interval. The time interval is measured from the time, the object was initialized.

Returns
the time in seconds or milliseconds.
QDataStream & rdf::Timer::put ( QDataStream &  s) const
virtual

Here is the caller graph for this function:

void rdf::Timer::start ( )
QString rdf::Timer::stringifyTime ( int  ct) const

Converts time to QString.

Parameters
ctcurrent time interval
Returns
QString the time interval as string

Here is the caller graph for this function:

Friends And Related Function Documentation

DllCoreExport QDataStream& operator<< ( QDataStream &  s,
const Timer t 
)
friend
DllCoreExport QDebug operator<< ( QDebug  d,
const Timer t 
)
friend

Member Data Documentation

QTime rdf::Timer::mTimer
protected

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