public final class StopWatch
extends java.lang.Object
| Constructor and Description |
|---|
StopWatch(java.lang.String id) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getId() |
boolean |
isRunning()
Return whether the stop watch is currently running.
|
int |
size()
Return the number of tasks timed.
|
void |
start(java.lang.String taskName) |
void |
stop() |
java.util.function.Supplier<java.lang.String> |
stringify()
Allows for a deferred conversion to a string.
|
<V> V |
time(java.lang.String taskName,
java.util.concurrent.Callable<V> callable) |
public java.lang.String getId()
public boolean isRunning()
currentTaskNamepublic int size()
public void start(java.lang.String taskName)
public void stop()
public java.util.function.Supplier<java.lang.String> stringify()
public <V> V time(java.lang.String taskName,
java.util.concurrent.Callable<V> callable)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2000-2018 Sualeh Fatehi. All rights reserved.