blah2
A real-time passive radar
Timing.h
Go to the documentation of this file.
1 
6 #ifndef TIMING_H
7 #define TIMING_H
8 
9 #include <stdint.h>
10 #include <vector>
11 #include <string>
12 
13 class Timing
14 {
15 private:
17  uint64_t tStart;
18 
20  uint64_t tNow;
21 
23  uint64_t n;
24 
26  uint64_t uptime;
27 
29  std::vector<double> time;
30 
32  std::vector<std::string> name;
33 
34 public:
38  Timing(uint64_t tStart);
39 
45  void update(uint64_t tNow, std::vector<double> time, std::vector<std::string> name);
46 
49  std::string to_json();
50 
55  bool save(std::string json, std::string path);
56 };
57 
58 #endif
A class to store timing statistics.
Definition: Timing.h:14
uint64_t tNow
Current time (POSIX ms).
Definition: Timing.h:20
void update(uint64_t tNow, std::vector< double > time, std::vector< std::string > name)
Update the time differences and names.
Definition: Timing.cpp:17
bool save(std::string json, std::string path)
Append the map to a save file.
Definition: Timing.cpp:50
uint64_t tStart
Start time (POSIX ms).
Definition: Timing.h:17
std::vector< std::string > name
Names of time differences.
Definition: Timing.h:32
uint64_t n
Number of CPI's.
Definition: Timing.h:23
uint64_t uptime
Time since first CPI (ms).
Definition: Timing.h:26
Timing(uint64_t tStart)
Constructor.
Definition: Timing.cpp:11
std::vector< double > time
Time differences (ms).
Definition: Timing.h:29
std::string to_json()
Generate JSON of the map and metadata.
Definition: Timing.cpp:26