Function cmd_getc in command.c contains this line (2.7.3):
#define TIMEOUT_USEC 5000
TIMEOUT_USEC is used only once, in:
value.tv_usec = TIMEOUT_USEC;
cmd_getc defines:
struct timeval value;
<bits/time.h> defines timeval:
struct timeval
{
__time_t tv_sec; /* Seconds. */
__time_t tv_usec; /* Microseconds. */
};
<bits/types.h> defines:
typedef long int __time_t;
So TIMEOUT_USEC is a long integer specifying microseconds.
I was wondering whether
#define TIMEOUT_USEC 5000
means that cmd_getc probes for input almost 200 times a
second. And if so, could this not slow down processes in
the background?
I tested a value of 50000 and noticed no effect on the
performance of rxvt.
Far larger values do slow down rxvt significantly;
delaying the rendering of the last character typed.
So I wondered why a value of 5000 was chosen, and
if this really means that cmd_getc probes for input
200 times a second?
Cheers,
Tijs