[mlpack-git] master: Add getter for timerState. (5480ea7)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Dec 2 15:40:16 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/abd5fdc7f7ce73f10e983fac3749505bd67871d6...924425c35ddbf8c7c8c830ee8a67595909ed380e
>---------------------------------------------------------------
commit 5480ea7ed1f879d095d9f0ce17e0dbcc73761f85
Author: Grzegorz Krajewski <krajekg at gmail.com>
Date: Wed Dec 2 20:44:23 2015 +0100
Add getter for timerState.
Returns state of the given timer to pass it for CLI destructor.
>---------------------------------------------------------------
5480ea7ed1f879d095d9f0ce17e0dbcc73761f85
src/mlpack/core/util/timers.hpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mlpack/core/util/timers.hpp b/src/mlpack/core/util/timers.hpp
index d5eb359..ce66c5e 100644
--- a/src/mlpack/core/util/timers.hpp
+++ b/src/mlpack/core/util/timers.hpp
@@ -137,6 +137,13 @@ class Timers
 */
void StopTimer(const std::string& timerName);
+ /**
+ * Returns state of the given timer.
+ *
+ * @param timerName The name of the timer in question.
+ */
+ bool GetState(std::string timerName);
+
private:
//! A map of all the timers that are being tracked.
std::map<std::string, timeval> timers;
More information about the mlpack-git
mailing list