anchor.diff:  
   void main(List<String> arguments) {
     var options = parseArgs(arguments);
  -  connect(options.host, options.port).then((observatory) {
  -    getAllCoverage(observatory)
  -        .then(JSON.encode)
  -        .then(options.out.write)
  -        .then((_) => options.out.close())
  -        .then((_) => options.unpin ? unpinIsolates(observatory) : null)
  -        .then((_) => observatory.close());
  +  var watch = new Stopwatch()..start();
  +  new Timer.periodic(new Duration(milliseconds: 200), (timer) {
  +    connect(options.host, options.port).then((observatory) {
  +      timer.cancel();
  +      getAllCoverage(observatory)
  +          .then(JSON.encode)
  +          .then(options.out.write)
  +          .then((_) => options.out.close())
  +          .then((_) => options.unpin ? unpinIsolates(observatory) : null)
  +          .then((_) => observatory.close());
  +    }, onError: (_) {
  +      if ((options.timeout != null) && (watch.elapsed > options.timeout)) {
  +        var timeout = options.timeout.inSeconds;
  +        print('Failed to collect coverage within ${timeout}s');
  +        exit(1);
  +      }
  +    });
     });
   }
   
  
positive.code:   parser.addOption('port', abbr: 'p', help: 'remote VM port');
    parser.addOption('out', abbr: 'o', defaultsTo: 'stdout',
        help: 'output: may be file or stdout');
    parser.addFlag('unpin-isolates', abbr: 'u', defaultsTo: false,
        help: 'unpin all isolates on exit');
    parser.addFlag('help', abbr: 'h', negatable: false,
  
negative.code: 
    if (args['port'] == null) fail('port not specified');
  
    var out = (args['out'] == 'stdout') ? stdout
        : new File(args['out']).openWrite();
    var timeout = (args['connect-timeout'] == null) ? null
        : new Duration(seconds: int.parse(args['connect-timeout']));
    return new Options(args['host'], args['port'], out, timeout,
        args['unpin-isolates']);
  }
  