|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.util.Timing
public class Timing
A class for measuring how long things take. For backward compatibility, this class contains static methods, but the preferred usage is to instantiate a Timing object and use instance methods.
Constructor Summary | |
---|---|
Timing()
Constructs new Timing object and starts the timer. |
Method Summary | |
---|---|
static long |
endTime()
Return elapsed time on (static) timer (without stopping timer). |
static long |
endTime(String str)
Print elapsed time on (static) timer to System.err (without stopping timer). |
static long |
endTime(String str,
PrintStream stream)
Print elapsed time on (static) timer (without stopping timer). |
long |
report()
Return elapsed time (without stopping timer). |
long |
report(String str)
Print elapsed time to System.err (without stopping timer). |
long |
report(String str,
PrintStream stream)
Print elapsed time (without stopping timer). |
long |
report(String str,
PrintWriter writer)
Print elapsed time (without stopping timer). |
long |
restart()
Restart timer. |
long |
restart(String str)
Print elapsed time to System.err and restart timer. |
long |
restart(String str,
PrintStream stream)
Print elapsed time and restart timer. |
long |
restart(String str,
PrintWriter writer)
Print elapsed time and restart timer. |
void |
start()
Start timer. |
static void |
startTime()
Start (static) timer. |
long |
stop()
Stop timer. |
long |
stop(String str)
Print elapsed time to System.err and stop timer. |
long |
stop(String str,
PrintStream stream)
Print elapsed time and stop timer. |
long |
stop(String str,
PrintWriter writer)
Print elapsed time and stop timer. |
static long |
tick()
Restart (static) timer. |
static long |
tick(String str)
Print elapsed time to System.err and restart (static) timer. |
static long |
tick(String str,
PrintStream stream)
Print elapsed time and restart (static) timer. |
String |
toSecondsString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timing()
Method Detail |
---|
public void start()
public long report()
public long report(String str, PrintStream stream)
str
- Additional prefix string to be printedstream
- PrintStream on which to write output
public long report(String str)
System.err
(without stopping timer).
str
- Additional prefix string to be printed
public long report(String str, PrintWriter writer)
str
- Additional prefix string to be printedwriter
- PrintWriter on which to write output
public String toSecondsString()
public long restart()
public long restart(String str, PrintStream stream)
str
- Additional prefix string to be printedstream
- PrintStream on which to write output
public long restart(String str)
System.err
and restart timer.
str
- Additional prefix string to be printed
public long restart(String str, PrintWriter writer)
str
- Additional prefix string to be printedwriter
- PrintWriter on which to write output
public long stop()
public long stop(String str, PrintStream stream)
str
- Additional prefix string to be printedstream
- PrintStream on which to write output
public long stop(String str)
System.err
and stop timer.
str
- Additional prefix string to be printed
public long stop(String str, PrintWriter writer)
str
- Additional prefix string to be printedwriter
- PrintWriter on which to write output
public static void startTime()
public static long endTime()
public static long endTime(String str, PrintStream stream)
str
- Additional prefix string to be printedstream
- PrintStream on which to write output
public static long endTime(String str)
System.err
(without stopping timer).
str
- Additional prefix string to be printed
public static long tick()
public static long tick(String str, PrintStream stream)
str
- Additional prefix string to be printedstream
- PrintStream on which to write output
public static long tick(String str)
System.err
and restart (static) timer.
str
- Additional prefix string to be printed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |