Created
April 28, 2012 21:28
-
-
Save mourawaldson/2522176 to your computer and use it in GitHub Desktop.
Working with time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit; | |
/** | |
* Converter minutos para milisegundos. | |
* | |
* @param minutes | |
* @return long | |
*/ | |
public static long ConvertMinutesToMilliseconds(int minutes) { | |
return TimeUnit.MINUTES.toMillis(minutes); | |
} | |
/** | |
* Converter horas em milisegundos. | |
* | |
* @param hours | |
* @return long | |
*/ | |
public static long ConvertHoursToMilliseconds(int hours) { | |
return TimeUnit.HOURS.toMillis(hours); | |
} | |
/** | |
* Converter dias em milisegundos. | |
* | |
* @param days | |
* @return long | |
*/ | |
public static long ConvetDaysToMilliseconds(int days) { | |
return TimeUnit.DAYS.toMillis(days); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment