Here you can find the source of convertHoursToMillis(BigDecimal hours)
Parameter | Description |
---|---|
hours | a parameter |
private static BigDecimal convertHoursToMillis(BigDecimal hours)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { /**/*www. j a v a2 s . c o m*/ * Number of hours = # of hours * 60 seconds * 60 minutes * 1000 millis * @param hours * @return hours converted to milliseconds */ private static BigDecimal convertHoursToMillis(BigDecimal hours) { return hours.multiply(convertMinutesToMillis(new BigDecimal(60))); } /** * Number of minutes = # of minutes * 60 seconds * 1000 millis * @param minutes * @return minutes converted to milliseconds */ private static BigDecimal convertMinutesToMillis(BigDecimal minutes) { return minutes.multiply(convertSecondsToMillis(new BigDecimal(60))); } /** * Number of second = # of seconds * 1000 millis * @param seconds * @return seconds converted to milliseconds */ private static BigDecimal convertSecondsToMillis(BigDecimal seconds) { return seconds.multiply(new BigDecimal(1000)); } }