|
From: Yoda-JM <yo...@us...> - 2011-02-24 10:33:54
|
Author: Lasse Kärkkäinen <tronic+ndrm at trn.iki.fi> Date: Sat Feb 5 16:30:14 2011 +0100 Allow choosing profilers via logging system: profiler-name/info --- game/profiler.hh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game/profiler.hh b/game/profiler.hh index 7beec08..f56db2b 100644 --- a/game/profiler.hh +++ b/game/profiler.hh @@ -11,8 +11,8 @@ class Profiler { boost::xtime m_time; public: /// create a new profiler with a given name - Profiler(std::string const& name): m_time(now()) { m_oss << name << ": "; } - ~Profiler() { std::clog << "Profiler/info: " << m_oss.str() << std::endl; } + Profiler(std::string const& name): m_time(now()) { m_oss << "profiler-" << name << "/info: "; } + ~Profiler() { std::clog << m_oss.str() << std::endl; } /// calling the object as a function will return the time since the start void operator()(std::string const& tag) { boost::xtime n = now(); |