List of utility methods to do Time Format
String | formatRuntime(long time, boolean fixedlength) Formats the runtime for output double h_full = ((double) time) / 3600000; long h = (long) h_full; double min_full = ((h_full - h) * 60); long min = (long) min_full; double sec_full = ((min_full - min) * 60); long sec = (long) sec_full; double msec_full = ((sec_full - sec) * 1000); long msec = (long) msec_full; ... |
String | formatSample(final int aValue, final long aTimestamp) Formats the given value and timestamp into a single sample string. final String hexVal = Integer.toHexString(aValue & Integer.MAX_VALUE); final StringBuilder sb = new StringBuilder(); sb.append("00000000".substring(hexVal.length())); sb.append(hexVal); sb.append("@"); sb.append(Long.toString(aTimestamp & Long.MAX_VALUE)); return sb.toString(); |
String | formatSignificantElapsedTime(final long seconds) Print only the most significant portion of the time. final long days = seconds / 86400; final StringBuffer buffer = new StringBuffer(); if (days > 0) buffer.append(days); buffer.append("d "); buffer.append(((seconds / 3600) % 24)); buffer.append("h"); ... |
String | formatStartRowKeyString(String id, String timestampStart) HBase takes in a string to start the scan at. timestampStart = formatTimestampStart(timestampStart);
String startRowKeyString = buildRowKeyFilterString(id, timestampStart);
return startRowKeyString;
|
String | formatStrDateTime(String stringDateTime) format Str Date Time stringDateTime = stringDateTime.replaceAll(":", ""); stringDateTime = stringDateTime.replaceAll("-", ""); stringDateTime = stringDateTime.replaceAll(" ", ""); return stringDateTime; |
String | formatString(String agentId, long agentStartTime, long transactionSequence) format String if (agentId == null) { throw new NullPointerException("agentId must not be null"); StringBuilder sb = new StringBuilder(64); sb.append(agentId); sb.append(TRANSACTION_ID_DELIMITER); sb.append(agentStartTime); sb.append(TRANSACTION_ID_DELIMITER); ... |
String | formattedStats(String pExecTime, int pTxns) formatted Stats String result = ""; result = Integer.toString(pTxns) + " txns, in " + pExecTime + " secs."; return result; |
String | formattedUnixTime() formatted Unix Time return Long.toString(System.currentTimeMillis());
|
String | formatTime(byte[] btValue, int iOffset, int iLength) format Time if ((btValue.length < iOffset + iLength) || (iLength < 3)) return ""; return getBCDString(btValue[iOffset + 0]) + ":" + getBCDString(btValue[iOffset + 1]) + ":" + getBCDString(btValue[iOffset + 2]); |
String | formatTime(double time) format Time int hours = (int) time / 3600; int minutes = (int) (time - (hours * 3600)) / 60; int seconds = (int) time - (hours * 3600) - (minutes * 60); String hoursString = hours + ""; String minutesString = minutes + ""; String secondsString = seconds + ""; while (minutesString.length() < 2) { minutesString = "0" + minutesString; ... |