public final class TimeUtil extends Object
| Modifier and Type | Method and Description | 
|---|---|
static long | 
timeInMsOrOneIfResultIsZero(long time,
                           TimeUnit timeunit)
Convert time to milliseconds based on the input time-unit. 
 | 
static long | 
timeInMsOrTimeIfNullUnit(long time,
                        TimeUnit timeunit)
Convert time to milliseconds based on the input time-unit. 
 | 
static long | 
zeroOutMs(long timestamp)
Cleans the milliseconds info from the timestamp 
 | 
public static long timeInMsOrOneIfResultIsZero(long time,
                                               TimeUnit timeunit)
time - The input timetimeunit - The input time-unit to base the conversion onNullPointerException - if timeunit is nullpublic static long timeInMsOrTimeIfNullUnit(long time,
                                            TimeUnit timeunit)
time - The input timetimeunit - The input time-unit to base the conversion onnullpublic static long zeroOutMs(long timestamp)
timestamp - The input timestampCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.