Code example for TimeUnit

Methods: toSeconds

0
	 * get Current time in seconds 
	 *  
	 * @return current time in seconds 
	 */ 
	public static long getCurrentTimeInSeconds() { 
		return TimeUnit.SECONDS.toSeconds(Calendar.getInstance()
				.getTimeInMillis());
 
	} 
 
} 
 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE