F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
IntervalTimer.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/IntervalTimer.hpp
3 // \brief Definition for Os::IntervalTimer
4 // ======================================================================
5 #ifndef _IntervalTimer_hpp_
6 #define _IntervalTimer_hpp_
7 
9 #include <Os/RawTime.hpp>
10 
11 namespace Os {
28  public:
30  IntervalTimer();
31 
33  ~IntervalTimer() = default;
34 
38  void start();
39 
43  void stop();
44 
55  U32 getDiffUsec() const;
56 
65 
66  PRIVATE:
67  RawTime m_startTime;
68  RawTime m_stopTime;
69 
72 
73 }; // class IntervalTimer
74 
75 } // namespace Os
76 
77 #endif
IntervalTimer()
Constructor.
void stop()
Capture the stop time of the interval.
Os::RawTime::Status getTimeInterval(Fw::TimeInterval &interval) const
Get the time interval between the start and stop times.
void start()
Capture the start time of the interval.
~IntervalTimer()=default
Destructor.
U32 getDiffUsec() const
Get the difference between start and stop times in microseconds.