public class TimeUtil extends Object
Constructor and Description |
---|
TimeUtil() |
Modifier and Type | Method and Description |
---|---|
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.
|
static long |
toMillis(int timeInSecs)
Converts seconds to milliseconds, with a precision of 1 second
|
static int |
toSecs(long timeInMillis)
Converts milliseconds to seconds
|
public static int toSecs(long timeInMillis)
timeInMillis
- public static long toMillis(int timeInSecs)
timeInSecs
- the time in secondspublic static int convertTimeToInt(long seconds)
seconds
- Long valueCopyright © 2003–2016 Terracotta, Inc.. All rights reserved.