diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java b/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java index 55f0440..3c6b08e 100644 --- a/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java +++ b/src/main/java/fr/umlv/java/wallj/viewer/StopWatch.java | |||
@@ -10,6 +10,9 @@ import java.time.Duration; | |||
10 | public class StopWatch { | 10 | public class StopWatch { |
11 | private long startTime = System.currentTimeMillis(); | 11 | private long startTime = System.currentTimeMillis(); |
12 | 12 | ||
13 | /** | ||
14 | * @return the duration since the creation of the stopwatch | ||
15 | */ | ||
13 | public Duration peek() { | 16 | public Duration peek() { |
14 | return Duration.ofMillis(System.currentTimeMillis() - startTime); | 17 | return Duration.ofMillis(System.currentTimeMillis() - startTime); |
15 | } | 18 | } |