xorp

TimeSpent Class Reference

(Debugging) Used to find code that has taken too long to execute. More...

#include <timespent.hh>

List of all members.

Public Member Functions

 TimeSpent (const char *function, const char *file, int line, int limit)
bool overlimit (TimeVal &delta)
bool overlimit ()
void check (const char *function, const char *file, int line)
 Has the alloted time been exceeded? If it has print a warning message.

Private Attributes

TimeVal _start
const char * _function
const char * _file
int _line
TimeVal _limit

Detailed Description

(Debugging) Used to find code that has taken too long to execute.

It is expected that this class will not be used directly but via the macros below. Thus allowing file, function and line number information to be captured.


Member Function Documentation

bool TimeSpent::overlimit ( TimeVal delta) [inline]
Parameters:
deltathe time that has passed.
Returns:
true if the alloted time has been exceeded.
bool TimeSpent::overlimit ( ) [inline]
Returns:
true if the alloted time has been exceeded.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations