diff options
Diffstat (limited to 'Plugins/utils/mir_log.h')
-rw-r--r-- | Plugins/utils/mir_log.h | 39 |
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, ...);
};
|