List of utility methods to do Milliseconds Parse
Long | parseTimeSpanMillis(final String text) Parse a time span expression and returns the milliseconds represented by this one. Long result = null; if (text != null) { try { result = Long.valueOf(text); } catch (@SuppressWarnings("unused") final NumberFormatException e) { result = parseTimeSpanExpression(text); return result; |
long | parseTimeStrToMilliseconds(String timeStr) parse Time Str To Milliseconds try { return Long.valueOf(timeStr); } catch (Exception ex) { return humanDateToSeconds(timeStr) * ONESECOND; |
long | parseToMillis(String s) parse To Millis try { return DATE_FORMAT.get().parse(s).getTime(); } catch (ParseException ex) { throw new RuntimeException(ex); |
void | pauseMilliseconds(long duration) Make a pause try { Thread.sleep(duration); } catch (Exception e) { Thread.currentThread().interrupt(); |
void | pauseMilliSeconds(long pauseMilliSeconds) pause Milli Seconds System.out.format("INFO:Utils::pauseMilliSeconds: %d ...", pauseMilliSeconds); try { Thread.sleep(pauseMilliSeconds); } catch (InterruptedException e) { System.out.format("consumed\n"); |