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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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.