|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.processmining.framework.util.StopWatch
public class StopWatch
Provides a simple timer facility, to measure the duration of tasks.
Field Summary | |
---|---|
static long |
DAY
|
protected long |
finish
Keeps the finish date |
static long |
HOUR
|
static long |
MINUTE
|
static long |
SECOND
Constants encoding the duration of time units in millisconds. |
protected long |
start
Keeps the start date |
Constructor Summary | |
---|---|
StopWatch()
Creates a new timer instance |
Method Summary | |
---|---|
java.lang.String |
formatDuration()
Retrieves the duration as a human-readable string |
static java.lang.String |
formatDuration(long timeInMillis)
Formats a duration, given in milliseconds, to a human-readable string (verbose) |
long |
getDuration()
Retrieves the duration |
java.util.Date |
getFinishDate()
Retrieves the finish date |
java.util.Date |
getStartDate()
Retrieves the start date |
void |
start()
Starts measuring the duration (sets start time) |
long |
stop()
Finishes measuring the duration (sets finish time) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long SECOND
public static final long MINUTE
public static final long HOUR
public static final long DAY
protected long start
protected long finish
Constructor Detail |
---|
public StopWatch()
Method Detail |
---|
public static java.lang.String formatDuration(long timeInMillis)
timeInMillis
-
public void start()
public long stop()
public java.util.Date getStartDate()
public java.util.Date getFinishDate()
public long getDuration()
public java.lang.String formatDuration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |