Go to the documentation of this file.
17 #ifndef GZ_COMMON_TIMER_HH_
18 #define GZ_COMMON_TIMER_HH_
21 #include <gz/common/Export.hh>
29 class IGNITION_COMMON_VISIBLE
Timer
35 public:
virtual ~
Timer();
38 public:
virtual void Start();
41 public:
virtual void Stop();
45 public:
bool Running()
const;
49 public:
Time Elapsed()
const;
66 private:
bool running;
Forward declarations for the common classes.
virtual void Start()
Start the timer.
A Time class, can be used to hold wall- or sim-time. stored as sec and nano-sec.
Definition: gz/common/Time.hh:33
bool Running() const
Returns true if the timer is running.
virtual ~Timer()
Destructor.
virtual void Stop()
Stop the timer.
A timer class, used to time things in real world walltime.
Definition: gz/common/Timer.hh:29
friend std::ostream & operator<<(std::ostream &out, const ignition::common::Timer &t)
Stream operator friendly.
Definition: gz/common/Timer.hh:52
Time Elapsed() const
Get the elapsed time.