1
1
/*
2
- * Copyright 2002-2021 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -82,8 +82,8 @@ public StopWatch() {
82
82
}
83
83
84
84
/**
85
- * Construct a new {@code StopWatch} with the given ID .
86
- * <p>The ID is handy when we have output from multiple stop watches and need
85
+ * Construct a new {@code StopWatch} with the given id .
86
+ * <p>The id is handy when we have output from multiple stop watches and need
87
87
* to distinguish between them.
88
88
* <p>Does not start any task.
89
89
* @param id identifier for this stop watch
@@ -94,8 +94,8 @@ public StopWatch(String id) {
94
94
95
95
96
96
/**
97
- * Get the ID of this {@code StopWatch}, as specified on construction.
98
- * @return the ID (empty String by default)
97
+ * Get the id of this {@code StopWatch}, as specified on construction.
98
+ * @return the id (empty String by default)
99
99
* @since 4.2.2
100
100
* @see #StopWatch(String)
101
101
*/
@@ -105,9 +105,8 @@ public String getId() {
105
105
106
106
/**
107
107
* Configure whether the {@link TaskInfo} array is built over time.
108
- * <p>Set this to {@code false} when using a {@code StopWatch} for millions
109
- * of intervals; otherwise, the {@code TaskInfo} structure will consume
110
- * excessive memory.
108
+ * <p>Set this to {@code false} when using a {@code StopWatch} for millions of
109
+ * tasks; otherwise, the {@code TaskInfo} structure will consume excessive memory.
111
110
* <p>Default is {@code true}.
112
111
*/
113
112
public void setKeepTaskList (boolean keepTaskList ) {
@@ -226,7 +225,7 @@ public TaskInfo getLastTaskInfo() throws IllegalStateException {
226
225
227
226
228
227
/**
229
- * Get the total time in nanoseconds for all tasks.
228
+ * Get the total time for all tasks in nanoseconds .
230
229
* @since 5.2
231
230
* @see #getTotalTimeMillis()
232
231
* @see #getTotalTimeSeconds()
@@ -236,7 +235,7 @@ public long getTotalTimeNanos() {
236
235
}
237
236
238
237
/**
239
- * Get the total time in milliseconds for all tasks.
238
+ * Get the total time for all tasks in milliseconds .
240
239
* @see #getTotalTimeNanos()
241
240
* @see #getTotalTimeSeconds()
242
241
*/
@@ -245,7 +244,7 @@ public long getTotalTimeMillis() {
245
244
}
246
245
247
246
/**
248
- * Get the total time in seconds for all tasks.
247
+ * Get the total time for all tasks in seconds .
249
248
* @see #getTotalTimeNanos()
250
249
* @see #getTotalTimeMillis()
251
250
*/
@@ -361,7 +360,7 @@ public String getTaskName() {
361
360
}
362
361
363
362
/**
364
- * Get the time in nanoseconds this task took.
363
+ * Get the time this task took in nanoseconds .
365
364
* @since 5.2
366
365
* @see #getTimeMillis()
367
366
* @see #getTimeSeconds()
@@ -371,7 +370,7 @@ public long getTimeNanos() {
371
370
}
372
371
373
372
/**
374
- * Get the time in milliseconds this task took.
373
+ * Get the time this task took in milliseconds .
375
374
* @see #getTimeNanos()
376
375
* @see #getTimeSeconds()
377
376
*/
@@ -380,14 +379,13 @@ public long getTimeMillis() {
380
379
}
381
380
382
381
/**
383
- * Get the time in seconds this task took.
382
+ * Get the time this task took in seconds .
384
383
* @see #getTimeMillis()
385
384
* @see #getTimeNanos()
386
385
*/
387
386
public double getTimeSeconds () {
388
387
return nanosToSeconds (this .timeNanos );
389
388
}
390
-
391
389
}
392
390
393
391
}
0 commit comments