MCPcopy Create free account
hub / github.com/antlr/codebuff / abbreviate

Method abbreviate

output/java_guava/1.4.13/Stopwatch.java:237–256  ·  view source on GitHub ↗
(TimeUnit unit)

Source from the content-addressed store, hash-verified

235 }
236
237 private static String abbreviate(TimeUnit unit) {
238 switch (unit) {
239 case NANOSECONDS:
240 return "ns";
241 case MICROSECONDS:
242 return "\u03bcs"; // μs
243 case MILLISECONDS:
244 return "ms";
245 case SECONDS:
246 return "s";
247 case MINUTES:
248 return "min";
249 case HOURS:
250 return "h";
251 case DAYS:
252 return "d";
253 default:
254 throw new AssertionError();
255 }
256 }
257}

Callers 1

toStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected