code: private static void saveImagesWithTimeRange(final Options options,
  			final Observable<File> files, Observable<Long> times,
  			final String imageDirectory) {
  
  		times.buffer(2, 1).doOnNext(new Action1<List<Long>>() {
  			AtomicInteger i = new AtomicInteger();
  
  			@Override
  			public void call(List<Long> pair) {
  				if (pair.size() < 2)
  					return;
  				Long startTime = pair.get(0);
  				Long finishTime = pair.get(1);
  				saveImageWithTimeRange(options, files, startTime, finishTime,
  						imageDirectory + "/map" + i.incrementAndGet() + ".png");
  			}
  		}).subscribe(reportErrors());
  
  	}
docs: Saves a sequence of image files of Vessel Traffic Density plots to the
  <code>imageDirectory</code> with filenames map1.png, map2.png, etc.
  
  @param options
  @param files
  @param times
  @param imageDirectory