comparison input/input.c @ 33929:ef9b6445fc55

Ensure we do not use 100% CPU when waiting for input with no file-based inputs.
author reimar
date Sat, 27 Aug 2011 09:58:54 +0000
parents 77bf38091051
children 6edabf4151e9
comparison
equal deleted inserted replaced
33928:27b1c4df84bd 33929:ef9b6445fc55
1267 if (errno != EINTR) 1267 if (errno != EINTR)
1268 mp_msg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrSelect, 1268 mp_msg(MSGT_INPUT, MSGL_ERR, MSGTR_INPUT_INPUT_ErrSelect,
1269 strerror(errno)); 1269 strerror(errno));
1270 FD_ZERO(&fds); 1270 FD_ZERO(&fds);
1271 } 1271 }
1272 } 1272 } else if (time)
1273 usec_sleep(time * 1000);
1273 } 1274 }
1274 #else 1275 #else
1275 if (!got_cmd && time) 1276 if (!got_cmd && time)
1276 usec_sleep(time * 1000); 1277 usec_sleep(time * 1000);
1277 #endif 1278 #endif