public class Stopwatch extends Object
Constructor and Description |
---|
Stopwatch() |
Modifier and Type | Method and Description |
---|---|
static CalendarDateDuration |
meassure(Runnable task)
Meassure task duration using this class' stopwatch functionality.
|
static CalendarDateDuration |
meassure(Runnable task,
CalendarDateUnit unit) |
void |
reset()
Reset the start-instant
|
CalendarDateDuration |
stop()
This method can be called repeatedly without resetting (doesn't actually stop the timing process)
|
CalendarDateDuration |
stop(CalendarDateUnit unit) |
public static CalendarDateDuration meassure(Runnable task)
task
- The task to meassurepublic static CalendarDateDuration meassure(Runnable task, CalendarDateUnit unit)
public void reset()
public CalendarDateDuration stop()
public CalendarDateDuration stop(CalendarDateUnit unit)
Copyright © 2018 Optimatika. All rights reserved.