5 #ifndef HPP_FCL_TIMINGS_FWD_H
6 #define HPP_FCL_TIMINGS_FWD_H
8 #include <boost/chrono.hpp>
12 namespace hpp {
namespace fcl {
37 using namespace boost::chrono;
39 process_real_cpu_clock::time_point wall = process_real_cpu_clock::now();
40 process_user_cpu_clock::time_point user = process_user_cpu_clock::now();
41 process_system_cpu_clock::time_point system = process_system_cpu_clock::now();
43 current.
wall = time_point_cast<nanoseconds>(wall).time_since_epoch().count()*1e-3;
44 current.
user = time_point_cast<nanoseconds>(user).time_since_epoch().count()*1e-3;
45 current.
system = time_point_cast<nanoseconds>(system).time_since_epoch().count()*1e-3;
67 current.
wall -= m_times.wall;
68 current.
user -= m_times.user;
69 current.
system -= m_times.system;
87 m_times.wall = (current.
wall - m_times.wall);
88 m_times.user = (current.
user - m_times.user);
89 m_times.system = (current.
system - m_times.system);
99 m_times.wall -= current.
wall;
100 m_times.user -= current.
user;
101 m_times.system -= current.
system;
void get_cpu_times(CPUTimes ¤t)
Definition: timings.h:35
double FCL_REAL
Definition: data_types.h:66
Main namespace.
Definition: AABB.h:44
FCL_REAL system
Definition: timings.h:18
CPUTimes()
Definition: timings.h:20
FCL_REAL wall
Definition: timings.h:16
FCL_REAL user
Definition: timings.h:17
void clear()
Definition: timings.h:26
This class mimics the way "boost/timer/timer.hpp" operates while using moder boost::chrono library.
Definition: timings.h:53
void start()
Definition: timings.h:73
CPUTimes m_times
Definition: timings.h:112
Timer()
Definition: timings.h:55
void stop()
Definition: timings.h:79
bool is_stopped() const
Definition: timings.h:105
CPUTimes elapsed() const
Definition: timings.h:60
void resume()
Definition: timings.h:93
bool m_is_stopped
Definition: timings.h:113