From 38e13942ac3fea4f900a84b19d0a987889230c79 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 5 Nov 2009 08:48:15 +0000 Subject: [PATCH] Now all timers are events, there is no longer any need to wake up every 50 ms - only wake up when an event happens. --- server.c | 7 +------ tmux.h | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/server.c b/server.c index a34d9b02..fe07f1a0 100644 --- a/server.c +++ b/server.c @@ -207,15 +207,10 @@ error: void server_loop(void) { - struct timeval tv; - - memset(&tv, 0, sizeof tv); - tv.tv_usec = POLL_TIMEOUT * 1000; - while (!server_should_shutdown()) { server_update_socket(); - event_loopexit(&tv); + event_loopexit(NULL); event_loop(EVLOOP_ONCE); server_window_loop(); diff --git a/tmux.h b/tmux.h index f1b0f7ac..40bd238b 100644 --- a/tmux.h +++ b/tmux.h @@ -62,9 +62,6 @@ extern char **environ; /* Escape timer period, in milliseconds. */ #define ESCAPE_PERIOD 500 -/* Maximum poll timeout (when attached). */ -#define POLL_TIMEOUT 50 - /* Maximum data to buffer for output before suspending reading from panes. */ #define BACKOFF_THRESHOLD 1024