From 647f72d2ed554c7e2b1923d485e99d89f3a17825 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Sun, 1 Nov 2009 20:58:36 -0500 Subject: [PATCH] Added a 1ns sleep after every frame This made the game run much smoother on Josh's debian box. --- main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.c b/main.c index 794ff8d..4a482fc 100644 --- a/main.c +++ b/main.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "font.h" @@ -137,6 +138,14 @@ extern int optind, opterr, optopt; // ************************************* FUNCS void +tiny_sleep() { + struct timespec t; + t.tv_sec = 0; + t.tv_nsec = 1; + nanosleep(&t, 0); +} + +void init_engine_dots() { int i; for(i = 0; i