Commit f00bb134 authored by chili's avatar chili
Browse files

test app loop

parent 6e0a7911
#include "App.h" #include "App.h"
#include <sstream>
#include <iomanip>
App::App() App::App()
: :
...@@ -30,5 +32,8 @@ int App::Go() ...@@ -30,5 +32,8 @@ int App::Go()
void App::DoFrame() void App::DoFrame()
{ {
const float t = timer.Peek();
std::ostringstream oss;
oss << "Time elapsed: " << std::setprecision( 1 ) << std::fixed << t << "s";
wnd.SetTitle( oss.str() );
} }
\ No newline at end of file
#pragma once #pragma once
#include "Window.h" #include "Window.h"
#include "ChiliTimer.h"
class App class App
{ {
...@@ -11,4 +12,5 @@ private: ...@@ -11,4 +12,5 @@ private:
void DoFrame(); void DoFrame();
private: private:
Window wnd; Window wnd;
ChiliTimer timer;
}; };
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment