@Test public void testFormatTimeSecondsSinceEpoch() throws Exception { { StringBuilder buff = new StringBuilder(); Util.formatTimeSecondsSinceEpoch(10001L, buff); assertEquals("10.001", buff.toString()); } { StringBuilder buff = new StringBuilder(); Util.formatTimeSecondsSinceEpoch(10L, buff); assertEquals("10", buff.toString()); } }
public static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer) { String timeString = Long.toString(time); int len = timeString.length(); if (len < 3) { sbuffer.append(timeString); return; } sbuffer.append(timeString.substring(0, len - 3)); sbuffer.append('.'); sbuffer.append(timeString.substring(len - 3)); }
Util { public static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer) { String timeString = Long.toString(time); int len = timeString.length(); if (len < 3) { sbuffer.append(timeString); return; } sbuffer.append(timeString.substring(0, len - 3)); sbuffer.append('.'); sbuffer.append(timeString.substring(len - 3)); } }
Util { public static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer) { String timeString = Long.toString(time); int len = timeString.length(); if (len < 3) { sbuffer.append(timeString); return; } sbuffer.append(timeString.substring(0, len - 3)); sbuffer.append('.'); sbuffer.append(timeString.substring(len - 3)); } private  Util(); }
Util { public static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer) { String timeString = Long.toString(time); int len = timeString.length(); if (len < 3) { sbuffer.append(timeString); return; } sbuffer.append(timeString.substring(0, len - 3)); sbuffer.append('.'); sbuffer.append(timeString.substring(len - 3)); } private  Util(); static String logLevelNameForValue(int value); static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer); static void formatTimeISO(long time, StringBuilder sbuffer); static String escape(String s); }
Util { public static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer) { String timeString = Long.toString(time); int len = timeString.length(); if (len < 3) { sbuffer.append(timeString); return; } sbuffer.append(timeString.substring(0, len - 3)); sbuffer.append('.'); sbuffer.append(timeString.substring(len - 3)); } private  Util(); static String logLevelNameForValue(int value); static void formatTimeSecondsSinceEpoch(final long time, StringBuilder sbuffer); static void formatTimeISO(long time, StringBuilder sbuffer); static String escape(String s);  }