summaryrefslogtreecommitdiff
path: root/src/lib/timer.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-02-28 21:50:17 +0100
committerCarl Hetherington <cth@carlh.net>2021-02-28 21:50:17 +0100
commitf14a834eaa52f10b444995d177c504cc0a5ae0ee (patch)
tree9bfad0e44dc3c88c2cbcfe32953775550c4c297c /src/lib/timer.h
parente7440b69bf0dc486314544b0e1fb5ac2d45a9a8d (diff)
Move some comments into a header.
Diffstat (limited to 'src/lib/timer.h')
-rw-r--r--src/lib/timer.h6
1 files changed, 6 insertions, 0 deletions
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