diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-28 21:50:17 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-28 21:50:17 +0100 |
| commit | f14a834eaa52f10b444995d177c504cc0a5ae0ee (patch) | |
| tree | 9bfad0e44dc3c88c2cbcfe32953775550c4c297c /src/lib | |
| parent | e7440b69bf0dc486314544b0e1fb5ac2d45a9a8d (diff) | |
Move some comments into a header.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/timer.cc | 4 | ||||
| -rw-r--r-- | 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<string> 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<std::string, Counts> _counts; }; + #endif |
