voxelTerrain
 All Classes Functions Variables Typedefs Enumerations Pages
timer.hpp
1 #ifndef TIMER_HPP
2 #define TIMER_HPP
3 
4 #include "blub/core/globals.hpp"
5 #include "blub/core/string.hpp"
6 
7 #include <boost/chrono/system_clocks.hpp>
8 
9 
10 namespace blub
11 {
12 
13 class timer
14 {
15 public:
16  timer(const string& outputText = blub::string("unnamed timer"));
17 
21  void start();
25  real end();
26 
27 private:
28  boost::chrono::system_clock::time_point m_timePoint;
29 
30  blub::string m_outputText;
31 };
32 
33 }
34 
35 #endif // TIMER_HPP
real end()
returns time in seconds, since last start() call
Definition: timer.cpp:20
Definition: timer.hpp:13
Definition: string.hpp:22
void start()
start gets a timepoint, call end to get the time passed from start()
Definition: timer.cpp:15
Definition: deadlineTimer.hpp:10