server.testmodules
Class TestModule.Timer

java.lang.Object
  extended by server.testmodules.TestModule.Timer
Enclosing class:
TestModule

protected class TestModule.Timer
extends java.lang.Object

The internal class that times the time a message takes to go from the server to the client and back.


Constructor Summary
TestModule.Timer(long send)
          Creates a Timer object with a send timestamp.
 
Method Summary
 long calculateTime()
          Calculates the time the message took from the server to the client and back.
 void setReceive(long receive)
          Sets the receival time of the message.
 java.lang.String toString()
          Convert the send and receival timestamps to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestModule.Timer

public TestModule.Timer(long send)
Creates a Timer object with a send timestamp.

Parameters:
send - The timestamp of which the message was sent.
Method Detail

setReceive

public void setReceive(long receive)
Sets the receival time of the message.

Parameters:
receive - The timestamp of which the message was received.

calculateTime

public long calculateTime()
Calculates the time the message took from the server to the client and back.

Returns:
The transmission time.

toString

public java.lang.String toString()
Convert the send and receival timestamps to a String.

Overrides:
toString in class java.lang.Object
Returns:
The timestamp String.