Releases: silentsoft/stopwatch
Releases · silentsoft/stopwatch
v2.2.1
v2.2.0
New Features
- Add
start(String, Runnable)
feature to measureRunnable
code snippets on the fly.
v2.1.0
New Features
- Add
pause()
andresume()
features inStopwatch
.
Bug Fixes
- Fix incorrect calculation of fraction digits in
NumberFormatter
.
v2.0.0
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()
andgetTotalElapsedSeconds()
methods inStopwatch
. - Support
add()
method inStopwatch
to customize the output.
v1.0.0
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 |