Norm can you check this ive got two System.currentTimeMillis() for the arrival_time and exit_time but how do state that the arrival_time corresponds to the add customer System.currentTimeMillis() and the wait_time corresponds to the remove customer System.currentTimeMillis() ?
public class Customer { int id; long arrival_time = System.currentTimeMillis(); long exit_time = System.currentTimeMillis(); String cashier; long wait_time = exit_time - arrival_time; public String toString() { return "Customer id="+id + " arvTm="+arrival_time; } }
try { Thread.sleep(wait * 1); line.add(new Station()); System.currentTimeMillis(); System.out.println(line); }for (int i = 0; i < max_customers; i++) if (cashiers != null) { cashiers[0] = line.poll(); System.currentTimeMillis(); System.out.println(line); }