aGrUM  0.16.0
timer.cpp
Go to the documentation of this file.
1 
30 #include <agrum/core/timer.h>
31 
32 #ifdef GUM_NO_INLINE
33 # include <agrum/core/timer_inl.h>
34 #endif // GUM_NO_INLINE
35 
36 namespace gum {
37 
39  GUM_CONSTRUCTOR(Timer);
40  reset();
41  }
42 
43  Timer::Timer(const Timer& from) :
44  _start(from._start), _pause(from._pause), _sleeping(from._sleeping) {
45  GUM_CONS_CPY(Timer);
46  }
47 
48  Timer::~Timer() { GUM_DESTRUCTOR(Timer); }
49 
50  Timer& Timer::operator=(const Timer& from) {
51  GUM_OP_CPY(Timer);
52  _start = from._start;
53  _pause = from._pause;
54  _sleeping = from._sleeping;
55  return *this;
56  }
57 
58 } /* namespace gum */
std::chrono::high_resolution_clock::time_point _pause
Time of the last call to pause().
Definition: timer.h:122
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
void reset()
Reset the timer.
Definition: timer_inl.h:32
Timer()
Default constructor (launching the timer).
Definition: timer.cpp:38
bool _sleeping
False if running.
Definition: timer.h:125
Timer & operator=(const Timer &timer)
Copy operator.
Definition: timer.cpp:50
std::chrono::high_resolution_clock::time_point _start
Time of the last call to reset() or the constructor.
Definition: timer.h:119
Class used to compute response times for benchmark purposesThis class represents a classic timer...
Definition: timer.h:51
~Timer()
Destructor.
Definition: timer.cpp:48