Skip to content

Instantly share code, notes, and snippets.

@kahrl kahrl/gist:5646751
Created May 24, 2013

Embed
What would you like to do?
diff --git a/src/main.cpp b/src/main.cpp
index eda9927..42fa45b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -79,6 +79,8 @@
#include "sound.h"
#include "sound_openal.h"
+TimeTaker *g_mainmenutimetaker;
+
/*
Settings.
These are loaded from the config file.
@@ -1577,6 +1579,8 @@ 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);
@@ -1856,6 +1860,7 @@ int main(int argc, char *argv[])
s32 handle = sound->playSound(spec, true);
infostream<<"Created main menu"<<std::endl;
+ dstream<<"Main menu took "<<g_mainmenutimetaker->getTimerTime()<<"ms to initialize"<<std::endl;
while(device->run() && kill == false)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.