| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long | ONE_SECOND
Constant that contains the amount of milliseconds in a second |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: Same int value unless long> Integer.MAX_VALUE in which case MAX_VALUE is returnedLong value seconds)Converts a long seconds value to an int seconds value and takes into account overflow from the downcast by switching to Integer.MAX_VALUE. |
| public static long | Returns: The equivalent time in millisecondsthe time in seconds timeInSecs)Converts seconds to milliseconds, with a precision of 1 second |
| public static int |
| ONE_SECOND | back to summary |
|---|---|
| pack-priv static final long ONE_SECOND Constant that contains the amount of milliseconds in a second | |
| TimeUtil | back to summary |
|---|---|
| public TimeUtil() | |
| convertTimeToInt | back to summary |
|---|---|
| public static int convertTimeToInt(long seconds) Converts a long seconds value to an int seconds value and takes into account overflow from the downcast by switching to Integer.MAX_VALUE.
| |
| toMillis | back to summary |
|---|---|
| public static long toMillis(int timeInSecs) Converts seconds to milliseconds, with a precision of 1 second
| |
| toSecs | back to summary |
|---|---|
| public static int toSecs(long timeInMillis) Converts milliseconds to seconds
| |