Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/timer/timer.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
21 | 21 |
22 # if defined(_MSC_VER) | 22 # if defined(_MSC_VER) |
23 # pragma warning(push) // Save warning settings | 23 # pragma warning(push) // Save warning settings |
24 # pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>' | 24 # pragma warning(disable : 4251) // disable warning: class 'std::basic_string<_Elem,_Traits,_Ax>' |
25 # endif // needs to have dll-interface... | 25 # endif // needs to have dll-interface... |
26 | |
27 //--------------------------------------------------------------------------------------// | |
28 | |
29 // TODO: | |
30 // | |
31 // * Add BOOST_NOEXCEPT where applicable | |
32 | 26 |
33 //--------------------------------------------------------------------------------------// | 27 //--------------------------------------------------------------------------------------// |
34 | 28 |
35 namespace boost | 29 namespace boost |
36 { | 30 { |
63 class BOOST_TIMER_DECL cpu_timer | 57 class BOOST_TIMER_DECL cpu_timer |
64 { | 58 { |
65 public: | 59 public: |
66 | 60 |
67 // constructor | 61 // constructor |
68 cpu_timer() { start(); } | 62 cpu_timer() BOOST_NOEXCEPT { start(); } |
69 | 63 |
70 // observers | 64 // observers |
71 bool is_stopped() const { return m_is_stopped; } | 65 bool is_stopped() const BOOST_NOEXCEPT { return m_is_stopped; } |
72 cpu_times elapsed() const; // does not stop() | 66 cpu_times elapsed() const BOOST_NOEXCEPT; // does not stop() |
73 std::string format(short places, const std::string& format) const | 67 std::string format(short places, const std::string& format) const |
74 { return ::boost::timer::format(elapsed(), places, format); } | 68 { return ::boost::timer::format(elapsed(), places, format); } |
75 std::string format(short places = default_places) const | 69 std::string format(short places = default_places) const |
76 { return ::boost::timer::format(elapsed(), places); } | 70 { return ::boost::timer::format(elapsed(), places); } |
77 // actions | 71 // actions |
78 void start(); | 72 void start() BOOST_NOEXCEPT; |
79 void stop(); | 73 void stop() BOOST_NOEXCEPT; |
80 void resume(); | 74 void resume() BOOST_NOEXCEPT; |
81 | 75 |
82 private: | 76 private: |
83 cpu_times m_times; | 77 cpu_times m_times; |
84 bool m_is_stopped; | 78 bool m_is_stopped; |
85 }; | 79 }; |