public class CheckpointTimeUtils extends Object
Constructor and Description |
---|
CheckpointTimeUtils() |
Modifier and Type | Method and Description |
---|---|
static long |
calculateTimeDifference(String timeStampOne,
String timeStampTwo)
This method used to calculate time difference of two timestamps.
|
static long |
calculateTimeDifferenceToPresent(String timeStamp)
This method used to calculate time difference between timestamp to present.
|
static String |
formatTimeDuration(long duration)
This method is used to format a timestamp to 'dd:hh:mm:ss'.
|
static String |
getCurrentTime()
This method is used to current time
|
static long |
getMillySecondsByDuration(String duration)
This method is used to get duration in milly seconds by passing the duration as a String.
|
static boolean |
isDurationBetweenTimestamps(long duration,
String minTime,
String maxTime)
This method used to check whether a duration is between a specific boundary.
|
public static boolean isDurationBetweenTimestamps(long duration, String minTime, String maxTime)
duration
- lifecycle current state duration timestamp.minTime
- boundary lower value.maxTime
- boundary upper value.public static long getMillySecondsByDuration(String duration)
duration
- duration as a String.public static long calculateTimeDifference(String timeStampOne, String timeStampTwo)
timeStampOne
- latest timestamp.timeStampTwo
- earlier timestamp.public static long calculateTimeDifferenceToPresent(String timeStamp)
timeStamp
- earlier timestamp.public static String getCurrentTime()
public static String formatTimeDuration(long duration)
duration
- timestamp duration.Copyright © 2018 WSO2. All rights reserved.