Variable wait time

This commit is contained in:
Keith Winstein
2011-08-10 00:13:22 -04:00
parent 4a90f6a0ef
commit e7df295f45
3 changed files with 13 additions and 14 deletions
+2 -6
View File
@@ -43,9 +43,7 @@ int main( int argc, char *argv[] )
uint64_t last_num = n->get_remote_state_num();
while ( true ) {
try {
n->tick();
if ( poll( &my_pollfd, 1, 5 ) < 0 ) {
if ( poll( &my_pollfd, 1, n->tick() ) < 0 ) {
perror( "poll" );
exit( 1 );
}
@@ -94,9 +92,7 @@ int main( int argc, char *argv[] )
while( true ) {
try {
n->tick();
if ( poll( fds, 2, 5 ) < 0 ) {
if ( poll( fds, 2, n->tick() ) < 0 ) {
perror( "poll" );
}