title: The execution phase run for 2 minutes during which time customers will arrive randomly between 2 - 6 seconds and be placed into a queue
body: <p>I managed to get the customers showing up at random times, the only problem I have now is wrapping the whole thing in a 2-minute timer without conflicting with the customer arrivals. </p>
  
  <pre><code>static Timer timer = new Timer();
  
  static class Task extends TimerTask {
      @Override
      public void run() {
          int delay = (new Random().nextInt(5)+2) * 1000;
          timer.schedule(new Task(), delay);
          System.out.println("Hi " + delay);
      }
  }
  
  public static void main(String args[]) {
      new Task().run();
  }
  </code></pre>
  
  <p>This is what I have that works so far. I've tried wrapping it in another <code>TimerTask</code>, and using <code>System.nanoTime()</code> and a while loop. They both just end up conflicting with the customer arrivals. I usually like to figure things out on my own, but I've been working on this one part for hours and I can't figure it out.</p>