Package com.complexible.common.timer
Class Timers
- java.lang.Object
-
- com.complexible.common.timer.Timers
-
public class Timers extends java.lang.Object
- Since:
- 2.0
- Version:
- 2.0
- Author:
- Evren Sirin
-
-
Constructor Summary
Constructors Constructor Description Timers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAll(Timers other)
void
checkTimer(java.lang.String name)
Timer
createTimer(java.lang.String name)
Timer
getTimer(java.lang.String name)
double
getTimerAverage(java.lang.String name)
java.util.Collection<Timer>
getTimers()
long
getTimerTotal(java.lang.String name)
void
interrupt()
void
print()
void
print(boolean shortForm)
void
print(boolean shortForm, java.lang.String sortBy)
void
print(java.io.Writer pw)
void
print(java.io.Writer pw, boolean shortForm, java.lang.String sortBy)
void
resetAll()
void
resetTimer(java.lang.String name)
void
setTimeout(java.lang.String name, long timeout)
Timer
startTimer(java.lang.String name)
void
stopTimer(java.lang.String name)
java.lang.String
toString()
-
-
-
Field Detail
-
mainTimer
public final Timer mainTimer
-
-
Method Detail
-
addAll
public void addAll(Timers other)
-
createTimer
public Timer createTimer(java.lang.String name)
-
startTimer
public Timer startTimer(java.lang.String name)
-
checkTimer
public void checkTimer(java.lang.String name) throws java.lang.Exception
- Throws:
java.lang.Exception
-
resetTimer
public void resetTimer(java.lang.String name)
-
interrupt
public void interrupt()
-
setTimeout
public void setTimeout(java.lang.String name, long timeout)
-
stopTimer
public void stopTimer(java.lang.String name)
-
resetAll
public void resetAll()
-
getTimerTotal
public long getTimerTotal(java.lang.String name)
-
getTimerAverage
public double getTimerAverage(java.lang.String name)
-
getTimer
public Timer getTimer(java.lang.String name)
-
getTimers
public java.util.Collection<Timer> getTimers()
-
print
public void print()
-
print
public void print(java.io.Writer pw)
-
print
public void print(boolean shortForm)
-
print
public void print(boolean shortForm, java.lang.String sortBy)
-
print
public void print(java.io.Writer pw, boolean shortForm, java.lang.String sortBy)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-