Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created May 24, 2013 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahrl/5646751 to your computer and use it in GitHub Desktop.
Save kahrl/5646751 to your computer and use it in GitHub Desktop.
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