public void startTimer(double durationInMilliseconds){
  startTime=System.nanoTime();
  timeout=startTime + (long)(durationInMilliseconds * 1000000);
}

public void startTimer ( double durationInMilliseconds ) { startTime = System . nanoTime ( ) ; timeout = startTime + ( long ) ( durationInMilliseconds * 1000000 ) ; }
start the timer . if the timer is already started , will simply define the timeout as now + duration a call to this method is mandatory if you want the timecheck method to throws timeout exceptions
