ch.hevs.isi.db

## Class TimeManager

- java.lang.Object
- - ch.hevs.isi.db.TimeManager

    public class TimeManager
    extends java.lang.Object

TimeManager Class This class allows to calculate a timestamp taking into account the time index of Minecraft Electrical Age and its time acceleration. (1 day = 10 minutes) You also have to indicate a number of days to subtract from the current time which will determine the time t0 which defines the starting time of the simulation.

### Constructor Summary

Constructors
Constructor and Description
`TimeManager(int minusDays)` Constructor of TimeManager class, where the start time of the game is calculated from today at midnight minus the given number of days.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`long` `getNanosForDB()` Gives the actual timestamp according to the EA clock.
`boolean` `isLastDay()` Returns `true`
`static void` `main(java.lang.String[] args)`
`void` `setTimestamp(float eaClock)` This method takes the index of the Electrical-Age clock and generates the corresponding timestamp.
`void` `setTimestamp(java.lang.String strEaClock)` This method takes the index of the Electrical-Age clock and generates the corresponding timestamp.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TimeManager

    public TimeManager(int minusDays)

Constructor of TimeManager class, where the start time of the game is calculated from today at midnight minus the given number of days. Today at midnight, from local time.

Parameters:
  `minusDays` - The number of days to subtract to the current day.

### Method Detail

#### setTimestamp

    public void setTimestamp(java.lang.String strEaClock)

This method takes the index of the Electrical-Age clock and generates the corresponding timestamp.

Parameters:
  `strEaClock` - The EA clock given as a `String`

#### setTimestamp

    public void setTimestamp(float eaClock)

This method takes the index of the Electrical-Age clock and generates the corresponding timestamp.

Parameters:
  `eaClock` - The EA clock given as a `float`

#### getNanosForDB

    public long getNanosForDB()

Gives the actual timestamp according to the EA clock.

Returns:
  The timestamp in nanoseconds

#### isLastDay

    public boolean isLastDay()

Returns `true`

Returns:

#### main

    public static void main(java.lang.String[] args)