Esempio n. 1
0
 public void readToEnd() {
   while (!completed) {
     try {
       clock.sleepForMillis(100);
     } catch (InterruptedException ignored) {
     }
   }
 }
Esempio n. 2
0
 private Long timeSinceLastLine(TimeUnit unit) {
   long now = clock.currentTimeMillis();
   return unit.convert(now - lastHeard, TimeUnit.MILLISECONDS);
 }