From 2cf54819aed0c92c6b2a83d0248f3e7f4a27ffed Mon Sep 17 00:00:00 2001 From: Stiffly Date: Wed, 23 Sep 2015 15:37:14 +0200 Subject: [PATCH] Printing some numbers --- src/game/Core/World.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/game/Core/World.cpp b/src/game/Core/World.cpp index c22aab3..677a5dc 100644 --- a/src/game/Core/World.cpp +++ b/src/game/Core/World.cpp @@ -58,13 +58,26 @@ void dd::World::Update(double dt) { const std::string &type = pair.first; auto system = pair.second; + LOG_INFO("System: %s", type.c_str()); - double timeStamp = glfwGetTime(); + + double start = glfwGetTime(); EventBroker->Process(type); - double t1 = glfwGetTime() - timeStamp; - LOG_INFO("Events: %d", t1); + double stop = glfwGetTime(); + double t1 = stop - start; + LOG_INFO("Events: %f", t1); + + start = glfwGetTime(); system->Update(dt); + stop = glfwGetTime(); + double t2 = stop - start; + LOG_INFO("Systems: %f", t2); + + start = glfwGetTime(); RecursiveUpdate(system, dt, 0); + stop = glfwGetTime(); + double t3 = stop - start; + LOG_INFO("Recursive Systems: %f", t3); } ProcessEntityRemovals();