summaryrefslogtreecommitdiff
path: root/ptyim.c
diff options
context:
space:
mode:
Diffstat (limited to 'ptyim.c')
-rw-r--r--ptyim.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ptyim.c b/ptyim.c
index 787581e..599eee3 100644
--- a/ptyim.c
+++ b/ptyim.c
@@ -6,6 +6,7 @@
#include <unistd.h>
#include <errno.h>
#include <string.h>
+#include <time.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -18,6 +19,11 @@
#include "im.h"
#include "escape.h"
#define WRITE_BUFFER_LEN 128
+//100ms latency should be fine
+#define IM_LATENCY 1000000
+struct timespec im_sleep = {0, IM_LATENCY};
+
+
//determines if the master process is running
int running = 1;
//pty master and slave fd
@@ -136,6 +142,7 @@ void * im_disp_routine (void *args) {
out_clr = 0;
}
}
+ nanosleep(&im_sleep, NULL);;
}
}
//main thread exit