https://github.com/artus/aevum
⏱️ Time the execution of your code
https://github.com/artus/aevum
code-metrics java java-8 maven metrics stopwatch
Last synced: 11 months ago
JSON representation
⏱️ Time the execution of your code
- Host: GitHub
- URL: https://github.com/artus/aevum
- Owner: artus
- License: mit
- Created: 2019-02-16T17:02:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-19T20:53:40.000Z (almost 7 years ago)
- Last Synced: 2025-02-09T10:31:24.326Z (about 1 year ago)
- Topics: code-metrics, java, java-8, maven, metrics, stopwatch
- Language: Java
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aevum
## Time code execution
[](https://travis-ci.org/artus/aevum)
## Example
```java
ProcessTimer myTimer = new ProcessTimer();
myTimer
.onStart(timer -> System.out.println("Started counting to 10"))
.onStop(timer -> System.out.println("Stopped counting to 10"))
.time(() -> {
int count = 0;
while (count < 10) System.out.println(++count);
});
System.out.println(String.format("Counting to 10 took %d milliseconds.", myTimer.getDuration().toMillis()));
```