Code example for TimeUnit

Methods: toSeconds

0
	 */ 
	@Override 
	public TimeWindowStatisticsConfig createTimeWindowStatistics(long timeWindow,
			TimeUnit timeUnit) {
		AverageTimeWindowStatisticsConfig config = new AverageTimeWindowStatisticsConfig();
		config.setTimeWindowSeconds(timeUnit.toSeconds(timeWindow));
		return config; 
	} 
 
	/** 
	 * Creates a configuration that calculates the average metric value across all service instances. 
	 */ 
	@Override 
	public InstancesStatisticsConfig createInstancesStatistics() { 
		return new AverageInstancesStatisticsConfig(); 
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java