summaryrefslogtreecommitdiff
path: root/Plugins/utils/mir_log.h
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-12-18 03:28:38 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-12-18 03:28:38 +0000
commitb3008a50cdda200d0f53344edc4f8fa1ffa25bec (patch)
tree062b27df2dae0914dbb3b9abd770b3ded1c082af /Plugins/utils/mir_log.h
parent93b8a76755fcf275ff1e33ec0ee86c6500d2352d (diff)
utils: sync with berliOS
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@186 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/utils/mir_log.h')
-rw-r--r--Plugins/utils/mir_log.h39
1 files changed, 11 insertions, 28 deletions
diff --git a/Plugins/utils/mir_log.h b/Plugins/utils/mir_log.h
index 3ceca42..2efaed2 100644
--- a/Plugins/utils/mir_log.h
+++ b/Plugins/utils/mir_log.h
@@ -37,39 +37,22 @@ class MLog
private:
std::string module;
std::string function;
+ LARGE_INTEGER start;
+ LARGE_INTEGER end;
+ LARGE_INTEGER total;
static int deep;
-public:
- MLog(const char *aModule, const char *aFunction) : module(aModule)
- {
- function = "";
- for(int i = 0; i < deep; i++)
- function += " ";
- function += aFunction;
-
- deep ++;
-
- mlog(module.c_str(), function.c_str(), "BEGIN");
- }
-
- ~MLog()
- {
- mlog(module.c_str(), function.c_str(), "END");
- deep --;
- }
+ void StartTimer();
+ void StopTimer();
+ double GetElapsedTimeMS();
+ double GetTotalTimeMS();
- int log(const char *fmt, ...)
- {
- va_list va;
- va_start(va, fmt);
-
- int ret = mlog(module.c_str(), function.c_str(), fmt, va);
-
- va_end(va);
+public:
+ MLog(const char *aModule, const char *aFunction);
+ ~MLog();
- return ret;
- }
+ int log(const char *fmt, ...);
};