code: public Double getNearestTime(double timePercentage) {
  		//the arrays should be sorted by time so this step is probably not needed
  		Double minTime = null;
  		Double maxTime = null;
  		for (Double t : time) {
  			if (minTime == null || t < minTime) {
  				minTime = t;
  			}
  			if (maxTime == null || t > maxTime) {
  				maxTime = t;
  			}
  		}
  		Double timeRange = maxTime - minTime;
  		Double targetTime = minTime + timePercentage * timeRange;
  		Double previousTime = null;
  		for (Double t : time) {
  			if (previousTime == null || t <= targetTime) {
  				previousTime = t;
  			} else {
  				return previousTime;
  			}
  		}
  		return previousTime;
  	}
docs: Need to find the actual time for the nearest time represented as a
  percentage Would be used to then look up the number at risk at that
  particular time
  
  @param timePercentage
  @return