public class RelativeTime extends Object
| Constructor and Description |
|---|
RelativeTime() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertIntToTime(int timeValue)
Converts an integer (representing the time in milliseconds) to a string (like "12:42:15.020")
|
static int |
convertTimeToInt(int h,
int m,
int s,
int ms)
Converts the time attribute values to one integer representing the time in milliseconds.
|
static int |
convertTimeToInt(String time)
Converts a string (like "12:42:15.020") to milliseconds
|
static int |
getHours(int timeValue)
Retrieves the amount of hours that are left in the timeValue variable (representing the time in milliseconds).
|
static int |
getMillis(int timeValue)
Retrieves the amount of milliseconds that are left in the timeValue variable (representing the time in milliseconds).
|
static int |
getMinutes(int timeValue)
Retrieves the amount of minutes that are left in the timeValue variable (representing the time in milliseconds).
|
static int |
getSeconds(int timeValue)
Retrieves the amount of seconds that are left in the timeValue variable (representing the time in milliseconds).
|
static void |
main(String[] args)
Entry point for calling this class from commandline.
|
public static int getHours(int timeValue)
timeValue - An integer which holds the relative time value.public static int getMinutes(int timeValue)
timeValue - An integer which holds the relative time value.public static int getSeconds(int timeValue)
timeValue - An integer which holds the relative time value.public static int getMillis(int timeValue)
timeValue - An integer which holds the relative time value.public static String convertIntToTime(int timeValue)
timeValue - The amount of time in milliseconds.public static int convertTimeToInt(int h,
int m,
int s,
int ms)
h - The amount of hoursm - The amount of minutess - The amount of secondsms - The amount of millispublic static int convertTimeToInt(String time)
time - A string which contains the relative time in the format "hours:minutes:seconds.millis"public static void main(String[] args)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}