Skip to content

Releases: silentsoft/stopwatch

v2.2.1

22 Jan 12:11
Compare
Choose a tag to compare

Enhancements

  • Add JavaDoc comments
  • Minor code cleanup

v2.2.0

07 Sep 02:27
Compare
Choose a tag to compare

New Features

  • Add start(String, Runnable) feature to measure Runnable code snippets on the fly.

v2.1.0

08 Aug 03:32
Compare
Choose a tag to compare

New Features

  • Add pause() and resume() features in Stopwatch.

Bug Fixes

  • Fix incorrect calculation of fraction digits in NumberFormatter.

v2.0.0

05 Aug 14:54
Compare
Choose a tag to compare

Enhancements

  • Add percentage information to the output.
  • Add NumberFormatter.percentage() method to format the given value.
  • Add more constructors to WatchItem.
  • Change some column names in the output to be shorter.
  • Support getTotalElapsedMilliseconds() and getTotalElapsedSeconds() methods in Stopwatch.
  • Support add() method in Stopwatch to customize the output.

v1.0.0

03 Aug 14:32
Compare
Choose a tag to compare

Usage

Stopwatch stopwatch = new Stopwatch();

stopwatch.start("first phase");
// ...
stopwatch.stop();

stopwatch.start("second phase");
// ...
stopwatch.stop();

stopwatch.print();

Result

|         name | elapsed(ms) | elapsed(s) |
|--------------|-------------|------------|
|  first phase |     1,234ms |     1.234s |
| second phase |       830ms |     0.830s |