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

Method abbreviate

corpus/java/training/guava/base/Stopwatch.java:223–242  ·  view source on GitHub ↗
(TimeUnit unit)

Source from the content-addressed store, hash-verified

221 }
222
223 private static String abbreviate(TimeUnit unit) {
224 switch (unit) {
225 case NANOSECONDS:
226 return "ns";
227 case MICROSECONDS:
228 return "\u03bcs"; // μs
229 case MILLISECONDS:
230 return "ms";
231 case SECONDS:
232 return "s";
233 case MINUTES:
234 return "min";
235 case HOURS:
236 return "h";
237 case DAYS:
238 return "d";
239 default:
240 throw new AssertionError();
241 }
242 }
243}

Callers 1

toStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected