Fire Core  8.0.0.alpha
GIS framework per tutti gli usi
 Tutto Classi Namespace Funzioni Variabili Ridefinizioni di tipo (typedef) Tipi enumerati (enum) Valori del tipo enumerato Friend
Chrono.hpp
1 // Copyright 2015 GEOSYSTEMS SRL
2 // All Rights Reserved.
3 
4 #ifndef FIRE_TIME_CHRONO_HPP_INCLUDED
5 #define FIRE_TIME_CHRONO_HPP_INCLUDED
6 
7 #include <boost/chrono.hpp>
8 
9 #include <exception>
10 #include <vector>
11 
12 #include "fire/export.hpp"
13 
18 namespace fire {
23 namespace time {
28 class FIRE_ENGINE_DLL Chrono {
29  private:
34  std::vector< boost::chrono::high_resolution_clock::time_point > times;
35 
36  public:
44  double start();
52  double stop();
63  double stop(double& deltaTime);
71  double getPartialTime();
82  double getPartialTime(double& deltaTime);
90  std::vector< double > getTimes() const;
91  void test(std::size_t floatsSize, float floats[]) {
92  try {
93  std::cout << "void test(std::size_t floatsSize, float floats[]);" << std::endl;
94  std::cout << "size: " << floatsSize << std::endl;
95  for (std::size_t floatIndex = 0 ; floatIndex < floatsSize ; floatIndex++) {
96  std::cout << "floats[" << floatIndex << "]: " << floats[floatIndex] << std::endl;
97  }
98  } catch (const std::exception& exception) {
99  throw;
100  }
101  }
102 };
103 } // namespace time
104 } // namespace fire
105 
106 #endif
Classe per la gestione di un cronometro.
Definition: Chrono.hpp:28