Electroneum
Loading...
Searching...
No Matches
performance_timer Class Reference

#include <performance_tests.h>

Public Types

typedef boost::chrono::high_resolution_clock clock

Public Member Functions

 performance_timer ()
void start ()
int elapsed_ms ()

Detailed Description

Definition at line 45 of file performance_tests.h.

Member Typedef Documentation

◆ clock

typedef boost::chrono::high_resolution_clock performance_timer::clock

Definition at line 48 of file performance_tests.h.

Constructor & Destructor Documentation

◆ performance_timer()

performance_timer::performance_timer ( )
inline

Definition at line 50 of file performance_tests.h.

51 {
52 m_base = clock::now();
53 }

Member Function Documentation

◆ elapsed_ms()

int performance_timer::elapsed_ms ( )
inline

Definition at line 60 of file performance_tests.h.

61 {
62 clock::duration elapsed = clock::now() - m_start;
63 return static_cast<int>(boost::chrono::duration_cast<boost::chrono::milliseconds>(elapsed).count());
64 }
Here is the caller graph for this function:

◆ start()

void performance_timer::start ( )
inline

Definition at line 55 of file performance_tests.h.

56 {
57 m_start = clock::now();
58 }
Here is the caller graph for this function:

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/tests/performance_tests/performance_tests.h