gecco.server.clock
Class TimeString

java.lang.Object
  |
  +--gecco.server.clock.TimeString

public class TimeString
extends Object

Description of the Class

Author:
Karl Hasselström

Constructor Summary
TimeString(Clock clock)
          Creates a new TimeString object which uses the given clock.
 
Method Summary
static String getBasicTimeUnit()
          Returns the name of the basic unit of game time.
 String getGameTime()
          Returns a String specifying the current game time.
 String getRealTime()
          Returns a String specifying the current real time.
static String getTimeString(double seconds, boolean isFrozen)
          Returns a String specifying the given time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeString

public TimeString(Clock clock)
Creates a new TimeString object which uses the given clock.
Parameters:
clock - The clock used to find out what time it is.
Method Detail

getGameTime

public String getGameTime()
Returns a String specifying the current game time.
Returns:
A String specifying the current game time.

getRealTime

public String getRealTime()
Returns a String specifying the current real time.
Returns:
A String specifying the current real time.

getBasicTimeUnit

public static String getBasicTimeUnit()
Returns the name of the basic unit of game time.
Returns:
The basic unit of game time.

getTimeString

public static String getTimeString(double seconds,
                                   boolean isFrozen)
Returns a String specifying the given time.
Parameters:
seconds - The current time, in seconds since the beginning of time.
isFrozen - Description of Parameter
Returns:
A String specifying the time.