Electroneum
Loading...
Searching...
No Matches
epee::math_helper::speed< default_time_window > Class Template Reference

#include <math_helper.h>

Public Member Functions

 speed ()
bool chick ()
bool chick (size_t count)
size_t get_speed ()

Detailed Description

template<uint64_t default_time_window>
class epee::math_helper::speed< default_time_window >

Definition at line 159 of file math_helper.h.

Constructor & Destructor Documentation

◆ speed()

template<uint64_t default_time_window>
epee::math_helper::speed< default_time_window >::speed ( )
inline

Definition at line 163 of file math_helper.h.

164 {
165 m_time_window = default_time_window;
166 m_last_speed_value = 0;
167 }

Member Function Documentation

◆ chick() [1/2]

template<uint64_t default_time_window>
bool epee::math_helper::speed< default_time_window >::chick ( )
inline

Definition at line 168 of file math_helper.h.

169 {
170#ifndef DEBUG_STUB
172 CRITICAL_REGION_BEGIN(m_lock);
173 m_chicks.push_back(ticks);
175 //flush(ticks);
176#endif
177 return true;
178 }
uint64_t get_tick_count()
#define CRITICAL_REGION_END()
Definition syncobj.h:233
#define CRITICAL_REGION_BEGIN(x)
Definition syncobj.h:229
Here is the call graph for this function:
Here is the caller graph for this function:

◆ chick() [2/2]

template<uint64_t default_time_window>
bool epee::math_helper::speed< default_time_window >::chick ( size_t count)
inline

Definition at line 180 of file math_helper.h.

181 {
182 for(size_t s = 0; s != count; s++)
183 chick();
184
185 return true;
186 }
Here is the call graph for this function:

◆ get_speed()

template<uint64_t default_time_window>
size_t epee::math_helper::speed< default_time_window >::get_speed ( )
inline

Definition at line 189 of file math_helper.h.

190 {
192 return m_last_speed_value = m_chicks.size();
193 }
Here is the call 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/contrib/epee/include/math_helper.h