From: Mikko Rasa Date: Fri, 19 Dec 2014 03:07:10 +0000 (+0200) Subject: Avoid using too much CPU time in the event tester X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=130828739f6b0d3934bf1e29ed2d87d9acf22e89;p=libs%2Fgui.git Avoid using too much CPU time in the event tester --- diff --git a/examples/ev.cpp b/examples/ev.cpp index e164879..8029df2 100644 --- a/examples/ev.cpp +++ b/examples/ev.cpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include using namespace Msp; @@ -48,6 +50,7 @@ Ev::Ev(int, char **): void Ev::tick() { window.tick(); + Time::sleep(Time::msec); } void Ev::key_press(unsigned key)