Skip to content
Snippets Groups Projects
Commit d4b42b0e authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

rename class bfps_timer to turtle_timer

parent 47079a5b
No related branches found
No related tags found
No related merge requests found
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
* Contact: Cristian.Lalescu@ds.mpg.de * * Contact: Cristian.Lalescu@ds.mpg.de *
* * * *
**********************************************************************/ **********************************************************************/
#ifndef BFPS_TIMER_HPP #ifndef TURTLE_TIMER_HPP
#define BFPS_TIMER_HPP #define TURTLE_TIMER_HPP
#include <chrono> #include <chrono>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
* The measured time is given by "getElapsed". * The measured time is given by "getElapsed".
* The total time measured by a timer is given by "getCumulated". * The total time measured by a timer is given by "getCumulated".
* Example : * Example :
* @code bfps_timer tm; // Implicit start * @code turtle_timer tm; // Implicit start
* @code ... * @code ...
* @code tm.stop(); // stop the timer * @code tm.stop(); // stop the timer
* @code tm.getElapsed(); // return the duration in s [A] * @code tm.getElapsed(); // return the duration in s [A]
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* [B] * [B]
* @code tm.getCumulated(); // Equal [A] + [B] * @code tm.getCumulated(); // Equal [A] + [B]
*/ */
class bfps_timer { class turtle_timer {
using double_second_time = std::chrono::duration<double, std::ratio<1, 1>>; using double_second_time = std::chrono::duration<double, std::ratio<1, 1>>;
std::chrono::high_resolution_clock::time_point std::chrono::high_resolution_clock::time_point
...@@ -53,16 +53,16 @@ class bfps_timer { ...@@ -53,16 +53,16 @@ class bfps_timer {
public: public:
/// Constructor /// Constructor
bfps_timer() : m_cumulate(std::chrono::nanoseconds::zero()) { start(); } turtle_timer() : m_cumulate(std::chrono::nanoseconds::zero()) { start(); }
/// Copy constructor /// Copy constructor
bfps_timer(const bfps_timer& other) = delete; turtle_timer(const turtle_timer& other) = delete;
/// Copies an other timer /// Copies an other timer
bfps_timer& operator=(const bfps_timer& other) = delete; turtle_timer& operator=(const turtle_timer& other) = delete;
/// Move constructor /// Move constructor
bfps_timer(bfps_timer&& other) = delete; turtle_timer(turtle_timer&& other) = delete;
/// Copies an other timer /// Copies an other timer
bfps_timer& operator=(bfps_timer&& other) = delete; turtle_timer& operator=(turtle_timer&& other) = delete;
/** Rest all the values, and apply start */ /** Rest all the values, and apply start */
void reset() { void reset() {
...@@ -101,4 +101,4 @@ public: ...@@ -101,4 +101,4 @@ public:
} }
}; };
#endif #endif//TURTLE_TIMER_HPP
...@@ -4,5 +4,5 @@ ...@@ -4,5 +4,5 @@
#ifdef USE_TIMINGOUTPUT #ifdef USE_TIMINGOUTPUT
EventManager global_timer_manager("BFPS", std::cout); EventManager global_timer_manager("TurTLE", std::cout);
#endif #endif
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <fstream> #include <fstream>
#include "base.hpp" #include "base.hpp"
#include "bfps_timer.hpp" #include "turtle_timer.hpp"
//< To add it as friend of EventManager //< To add it as friend of EventManager
class ScopeEvent; class ScopeEvent;
...@@ -737,7 +737,7 @@ protected: ...@@ -737,7 +737,7 @@ protected:
//< The core event //< The core event
EventManager::CoreEvent* m_event; EventManager::CoreEvent* m_event;
//< Time to get elapsed time //< Time to get elapsed time
bfps_timer m_timer; turtle_timer m_timer;
//< Is true if it has been created for task //< Is true if it has been created for task
bool m_isTask; bool m_isTask;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment