discoverpixy
timer.hpp
1 //
2 // begin license header
3 //
4 // This file is part of Pixy CMUcam5 or "Pixy" for short
5 //
6 // All Pixy source code is provided under the terms of the
7 // GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).
8 // Those wishing to use Pixy source code, software and/or
9 // technologies under different licensing terms should contact us at
10 // cmucam@cs.cmu.edu. Such licensing terms are available for
11 // all portions of the Pixy codebase presented here.
12 //
13 // end license header
14 //
15 
16 #ifndef __TIMER_HPP__
17 #define __TIMER_HPP__
18 
19 #include <stdint.h>
20 #include <string>
21 #include <boost/chrono.hpp>
22 
23 namespace util
24 {
25  class timer
26  {
27  public:
28 
29  timer();
30 
31  void reset();
32  uint32_t elapsed();
33 
34  private:
35 
36  boost::chrono::steady_clock::time_point epoch_;
37  };
38 }
39 
40 #endif
Definition: timer.hpp:23
Definition: timer.hpp:25