VectorNav C++ Library
vntime.h
1 #ifndef _VNXPLAT_TIME_H_
2 #define _VNXPLAT_TIME_H_
3 
4 #include "int.h"
5 #include "export.h"
6 
7 namespace vn {
8 namespace xplat {
9 
10 struct vn_proglib_DLLEXPORT TimeStamp
11 {
12 public:
13  TimeStamp();
14 
15 private:
16  TimeStamp(int64_t sec, uint64_t usec);
17 
18 public:
19 
20  // \brief Returns a timestamp.
21  //
22  // \return The timestamp.
23  static TimeStamp get();
24 
25 // HACK: Current values are made public until the TimeStamp interface
26 // is fully worked out.
27 //private:
28 public:
29  int64_t _sec; // Seconds.
30  uint64_t _usec; // Microseconds.
31 };
32 
34 class vn_proglib_DLLEXPORT Stopwatch
35 {
36 
37 public:
38 
40  Stopwatch();
41 
42  ~Stopwatch();
43 
45  void reset();
46 
50  float elapsedMs();
51 
52 private:
53  struct Impl;
54  Impl *_pi;
55 };
56 
57 }
58 }
59 
60 #endif
Provides simple timing capabilities.
Definition: vntime.h:34
Definition: vntime.h:10
Definition: mock.h:4
Definition: attitude.h:8