Package com.ptc.projectmanagement.util
Class DurationUtils
java.lang.Object
com.ptc.projectmanagement.util.DurationUtils
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic longtoMillis(double duration, DurationFormat durationFormat)
Supported API: true Returns the duration in milliseconds based on the DurationFormat In other words, it converts the specified value to milliseconds based on the format which was passed in Use this method if you have a situation where you have one unit, but need the millisecond value.
-
Method Details
-
toMillis
Supported API: true Returns the duration in milliseconds based on the DurationFormat In other words, it converts the specified value to milliseconds based on the format which was passed in Use this method if you have a situation where you have one unit, but need the millisecond value. ie long millis = DurationUtils.getMillis(1.0, DurationFormat.MINUTES); // sets a duration of 1 minute (1 * 60 * 1000) long millis = DurationUtils.getMillis(3.0, DurationFormat.WEEKS); // returns the millisecond equivalent of 3 weeks- Parameters:
duration-durationFormat- the format in which duration is specified- Throws:
WTException
-