topera commented on a change in pull request #482:
URL: https://github.com/apache/commons-lang/pull/482#discussion_r467651878



##########
File path: src/main/java/org/apache/commons/lang3/time/StopWatch.java
##########
@@ -606,4 +681,175 @@ public void unsplit() {
         this.splitState = SplitState.UNSPLIT;
     }
 
+    /**
+     * Stops the watch and returns the list of splits with duration on each 
split
+     * @return list of splits
+     */
+    public List<Split> getProcessedSplits() {
+        return getProcessedSplits(false);
+    }
+
+    /**
+     * Stops the watch and returns the list of splits with duration on each 
split (using milliseconds)
+     * @return list of splits
+     */
+    public List<Split> getNanoProcessedSplits() {
+        return getProcessedSplits(true);
+    }
+
+    /**
+     * Stops the watch and returns the list of splits with duration on each 
split
+     *
+     * @param useNanos if must use nanoseconds precision
+     * @return list of splits
+     */
+    public List<Split> getProcessedSplits(boolean useNanos) {

Review comment:
       Good idea, since it makes the code more clear. I'll change here. Thank 
you!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to