diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:27:58 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:27:58 +0000 |
commit | 5ac6ea61bde2162ec98b870d47a92d954818d7c5 (patch) | |
tree | d7f15aa9118af21d7201e2364a04479cdbe2d292 | |
parent | 66957412d5d68c78c5885bbeb11dd7e3a3d84997 (diff) | |
download | rtmux-5ac6ea61bde2162ec98b870d47a92d954818d7c5.tar.gz rtmux-5ac6ea61bde2162ec98b870d47a92d954818d7c5.tar.bz2 rtmux-5ac6ea61bde2162ec98b870d47a92d954818d7c5.zip |
Sync OpenBSD patchset 509:
Now all timers are events, there is no longer any need to wake up every 50 ms -
only wake up when an event happens.
-rw-r--r-- | server.c | 9 | ||||
-rw-r--r-- | tmux.h | 5 |
2 files changed, 3 insertions, 11 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.223 2009-11-08 23:12:35 tcunha Exp $ */ +/* $Id: server.c,v 1.224 2009-11-08 23:27:58 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -211,15 +211,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(); @@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.508 2009-11-08 23:26:56 tcunha Exp $ */ +/* $Id: tmux.h,v 1.509 2009-11-08 23:27:58 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -61,9 +61,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 |