Electroneum
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  }
mdb_size_t count(MDB_cursor *cur)
Here is the call graph for this function:
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: