if(earlierDeadline(current, deadline) == DeadlineStatus.EARLIER) {
remainingTime.setTime(deadline);
remainingTime.subtract(current);
long milliSecRemaining = remainingTime.getSeconds()*1000 + remainingTime.getNanoseconds()/ 1000000;
object.wait(milliSecRemaining);
Logger.debug("Thread " + threadID + " Wait is over ");
} else
Logger.debug("Thread " + threadID + " did not wait ");
} catch(InterruptedException ex) {