Modifier and Type | Method and Description |
---|---|
int |
activeTasks()
Returns the current number of tasks being executed.
|
long |
duration()
Returns the cumulative duration of all current tasks in nanoseconds.
|
long |
duration(long task)
Returns the current duration for a given active task.
|
long |
start()
Start keeping time for a task and return a task id that can be used to look up how long
it has been running.
|
long |
stop(long task)
Indicates that a given task has completed.
|
hasExpired, id, measure
long start()
long stop(long task)
task
- Id for the task to stop. This should be the value returned from start()
.long duration(long task)
task
- Id for the task to stop. This should be the value returned from start()
.long duration()
int activeTasks()