HLIBpro  2.1
Public Member Functions | Friends | List of all members
TTimer Class Reference

Timer class. More...

#include <TTimer.hh>

Inheritance diagram for TTimer:
TCPUTimer TThreadCPUTimer TWallTimer

Public Member Functions

 TTimer (const timetype_t type=CPU_TIME)
 construct timer of type type
 
TTimer & start ()
 start timer, resets time-sum
 
TTimer & pause ()
 pause timer, add elapsed time to sum
 
TTimer & cont ()
 continue timer, set start time to current time
 
double elapsed () const
 returns elapsed time without stopping timer
 
TTimer & wall ()
 set type of time to wall clock time
 
TTimer & cpu ()
 set type of time to wall cpu time
 
TTimer & cpu_thread ()
 set type of time to wall cpu time
 
std::string to_string () const
 convert to string
 

Friends

std::ostream & operator<< (std::ostream &os, const TTimer &timer)
 stream output
 

Detailed Description

Provides class for timing either using wall time or cpu time, i.e. actual time doing something without waiting for free resources.