#include <XrdMonTimer.hh>
Public Member Functions | |
XrdMonTimer () | |
void | reset () |
int | start () |
double | stop () |
double | getElapsed () const |
void | printElapsed (const char *str) |
void | printAll () const |
Private Member Functions | |
void | resetTBeg () |
void | resetTElapsed () |
double | calcElapsed () |
int | timerOn () const |
int | isOn (const struct timeval &t) const |
double | calcDif (const struct timeval &start, const struct timeval &stop) const |
void | printOne (const timeval &t, const char *prefix=0) const |
double | convert2Double (const timeval &t) const |
Private Attributes | |
timeval | _tbeg |
double | _elapsed |
|
|
|
|
|
Calculates elapsed time (from last "start" till now) and adds it to the current total elapsed time. Return elapsed time on success (or -1) |
|
|
|
Returns total elapsed time (sum of deltas between all "starts" and "stops"). If counter is currently started and not stopped that interval will not be included. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Starts the timer. Returns 0 on success. |
|
Stops the timer. Returns total elapsed time (sum of all deltas between "starts" and "stops"), or -1 on error. |
|
|
|
|
|
|