|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfeud.clientserver.PerformanceCounter
A simple class used by both, the client and the server, to measure bandwidth usage.
Constructor Summary | |
PerformanceCounter(java.lang.String label)
Creates a new counter. |
Method Summary | |
void |
in(int cnt)
Adds a number of bytes to the in-counter. |
void |
out(int cnt)
Adds a number of bytes to the out-counter. |
void |
printStats()
Prints the stats if more than 10 seconds have elapsed since the last printing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PerformanceCounter(java.lang.String label)
label
- the labelMethod Detail |
public void printStats()
public void in(int cnt)
cnt
- the numberpublic void out(int cnt)
cnt
- the number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |