From f14a834eaa52f10b444995d177c504cc0a5ae0ee Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 28 Feb 2021 21:50:17 +0100 Subject: [PATCH] Move some comments into a header. --- src/lib/timer.cc | 4 ---- src/lib/timer.h | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/timer.cc b/src/lib/timer.cc index 8e4d44547..84329a5d5 100644 --- a/src/lib/timer.cc +++ b/src/lib/timer.cc @@ -48,9 +48,6 @@ PeriodTimer::~PeriodTimer () cout << N_("T: ") << _name << N_(": ") << (seconds (stop) - seconds (_start)) << N_("\n"); } -/** @param n Name to use when giving output. - * @param s Initial state. - */ StateTimer::StateTimer (string n, string s) : _name (n) { @@ -72,7 +69,6 @@ StateTimer::set (string s) set_internal (s); } -/** @param s New state that the caller is in */ void StateTimer::set_internal (optional s) { diff --git a/src/lib/timer.h b/src/lib/timer.h index 44724ee02..e18b799d9 100644 --- a/src/lib/timer.h +++ b/src/lib/timer.h @@ -49,6 +49,7 @@ private: struct timeval _start; }; + /** @class StateTimer * @brief A class to allow measurement of the amount of time a program * spends in one of a set of states. @@ -61,9 +62,13 @@ class StateTimer { public: explicit StateTimer (std::string n); + /** @param n Name to use when giving output. + * @param s Initial state. + */ StateTimer (std::string n, std::string s); ~StateTimer (); + /** @param s New state that the caller is in */ void set (std::string s); void unset (); @@ -95,4 +100,5 @@ private: std::map _counts; }; + #endif -- 2.30.2