File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -703,24 +703,14 @@ - (BOOL)waitForInput:(int)milliseconds
703703 forMode: NSDefaultRunLoopMode ];
704704 }
705705
706- CFAbsoluteTime lastTime =
707- milliseconds >= 0 ? CFAbsoluteTimeGetCurrent () : .0 ;
708-
709706 while (CFRunLoopRunInMode (kCFRunLoopDefaultMode , dt, true )
710707 == kCFRunLoopRunHandledSource ) {
711- // In order to ensure that all input (except for channel) on the
712- // run-loop has been processed we set the timeout to 0 and keep
713- // processing until the run-loop times out.
714- if ([inputQueue count ] > 0 || input_available () || got_int) {
715- dt = 0.0 ;
708+ // In order to ensure that all input on the run-loop has been
709+ // processed we set the timeout to 0 and keep processing until the
710+ // run-loop times out.
711+ dt = 0.0 ;
712+ if ([inputQueue count ] > 0 || input_available () || got_int)
716713 inputReceived = YES ;
717- } else if (milliseconds >= 0 ) {
718- CFAbsoluteTime nowTime = CFAbsoluteTimeGetCurrent ();
719-
720- if ((dt -= nowTime - lastTime) <= 0.0 )
721- break ;
722- lastTime = nowTime;
723- }
724714 }
725715
726716 if ([inputQueue count ] > 0 || input_available () || got_int)
You can’t perform that action at this time.
0 commit comments