gui: Make framerate configurable

Default framerate is 30 FPS

Change-Id: Ia05357663905a3babecb95b1e3531ae45fc854c5
diff --git a/gui/gui.cpp b/gui/gui.cpp
index bb80632..e905812 100755
--- a/gui/gui.cpp
+++ b/gui/gui.cpp
@@ -528,9 +528,9 @@
 
 		timespec diff = TWFunc::timespec_diff(lastCall, curTime);
 
-		// This is really 2 or 30 times per second
+		// This is really 2 or TW_FRAMERATE times per second
 		// As long as we get events, increase the timeout so we can catch up with input
-		long timeout = got_event ? 500000000 : 33333333;
+		long timeout = got_event ? 500000000 : (1.0 / TW_FRAMERATE * 1000000000);
 
 		if (diff.tv_sec || diff.tv_nsec > timeout)
 		{