Created
May 24, 2013 22:01
-
-
Save kahrl/5646805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp | |
index 8abee4d..1719e73 100644 | |
--- a/src/guiEngine.cpp | |
+++ b/src/guiEngine.cpp | |
@@ -182,6 +182,7 @@ void TextDestGuiEngine::gotText(std::wstring text) | |
} | |
} | |
+ dstream<<"Main menu took "<<g_mainmenutimetaker->getTimerTime()<<"ms to initialize"<<std::endl; | |
run(); | |
m_menumanager->deletingMenu(m_menu); | |
diff --git a/src/main.cpp b/src/main.cpp | |
index 9490145..e83f770 100644 | |
--- a/src/main.cpp | |
+++ b/src/main.cpp | |
@@ -80,6 +80,8 @@ | |
#include "sound_openal.h" | |
#include "guiEngine.h" | |
+TimeTaker *g_mainmenutimetaker; | |
+ | |
/* | |
Settings. | |
These are loaded from the config file. | |
@@ -1404,6 +1406,7 @@ int main(int argc, char *argv[]) | |
// Create time getter | |
g_timegetter = new IrrlichtTimeGetter(device); | |
+ g_mainmenutimetaker = new TimeTaker("Main menu"); | |
// Create game callback for menus | |
g_gamecallback = new MainGameCallback(device); | |
diff --git a/src/main.h b/src/main.h | |
index df67a63..ac64a83 100644 | |
--- a/src/main.h | |
+++ b/src/main.h | |
@@ -20,6 +20,10 @@ | |
#ifndef MAIN_HEADER | |
#define MAIN_HEADER | |
+#include "util/timetaker.h" | |
+ | |
+extern TimeTaker *g_mainmenutimetaker; | |
+ | |
// Settings | |
class Settings; | |
extern Settings *g_settings; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment