XRootD
Loading...
Searching...
No Matches
XrdCl::mytimer_t Class Reference

Timer helper class. More...

+ Collaboration diagram for XrdCl::mytimer_t:

Public Member Functions

 mytimer_t ()
 Constructor (record start time)
 
double elapsed () const
 
void reset ()
 Reset the start time.
 

Detailed Description

Timer helper class.

Definition at line 155 of file XrdClReplay.cc.

Constructor & Destructor Documentation

◆ mytimer_t()

XrdCl::mytimer_t::mytimer_t ( )
inline

Constructor (record start time)

Definition at line 161 of file XrdClReplay.cc.

162 : start(clock_t::now())
163 {
164 }

Member Function Documentation

◆ elapsed()

double XrdCl::mytimer_t::elapsed ( ) const
inline
Returns
: get time elapsed from start

Definition at line 174 of file XrdClReplay.cc.

175 {
176 return (1.0
177 * (std::chrono::duration_cast<std::chrono::nanoseconds>(clock_t::now() - start).count())
178 / 1000000000.0);
179 }

Referenced by XrdCl::ActionExecutor::Execute(), XrdCl::ExecuteActions(), and main().

+ Here is the caller graph for this function:

◆ reset()

void XrdCl::mytimer_t::reset ( )
inline

Reset the start time.

Definition at line 169 of file XrdClReplay.cc.

169{ start = clock_t::now(); }

Referenced by XrdCl::ActionExecutor::Execute().

+ Here is the caller graph for this function:

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