diff --git a/doc/guide/timer.hpp b/doc/guide/timer.hpp index 9d606e8bbb..5a9216267b 100644 --- a/doc/guide/timer.hpp +++ b/doc/guide/timer.hpp @@ -31,7 +31,7 @@ Each timer is given a name, and is referenced by that name. You can call \c Timer::Start() and \c Timer::Stop() multiple times for a particular timer name, and the result will be the sum of the runs of the timer. Note that \c Timer::Stop() must be called before \c Timer::Start() is called again, -otherwise runtime_error exception will occur. +otherwise a std::runtime_error exception will be thrown. A "total_time" timer is run by default for each MLPACK program. diff --git a/src/mlpack/core/util/timers.hpp b/src/mlpack/core/util/timers.hpp index 9c840ce224..b5f3db6cc9 100644 --- a/src/mlpack/core/util/timers.hpp +++ b/src/mlpack/core/util/timers.hpp @@ -68,7 +68,8 @@ class Timer * both runs -- that is, MLPACK timers are additive for each time they are * run, and do not reset. * - * @note Runtime error exception will occur if a timer is started twice. + * @note A std::runtime_error exception will be thrown if a timer is started + * twice. * * @param name Name of timer to be started. */ @@ -77,7 +78,8 @@ class Timer /** * Stop the given timer. * - * @note Runtime error exception will occur if a timer is stopped twice. + * @note A std::runtime_error exception will be thrown if a timer is started + * twice. * * @param name Name of timer to be stopped. */ @@ -89,7 +91,7 @@ class Timer * @param name Name of timer to return value of. */ static timeval Get(const std::string& name); - + private: static std::map timerState; }; @@ -145,6 +147,6 @@ class Timers void GetTime(timeval* tv); }; -}; // namespace mlpack +} // namespace mlpack #endif // __MLPACK_CORE_UTILITIES_TIMERS_HPP