kleinron

stopwatch pattern

Feb 17th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.20 KB | None | 0 0
  1. Stopwatch stopwatch = Stopwatch.createStarted();
  2. // do lengthy operation here
  3. long elapsed = stopwatch.elapsed(TimeUnit.MILLISECONDS);
  4. logger.debug(String.format("operation foo took %d ms", elapsed));
Add Comment
Please, Sign In to add comment