package de.gurkenlabs.litiengine;

public class GameTime {
  private final IGameLoop gameLoop;

  public GameTime(final IGameLoop loop) {
    this.gameLoop = loop;
  }

  public long getDays() {
    return this.getMilliseconds() / 1000 / 60 / 60 / 24 % 365;
  }

  public long getHours() {
    return this.getMilliseconds() / 1000 / 60 / 60 % 24;
  }

  public long getMilliseconds() {
    return this.gameLoop.convertToMs(this.gameLoop.getTicks());
  }

  public long getMinutes() {
    return this.getMilliseconds() / 1000 / 60 % 60;
  }

  public long getSeconds() {
    return this.getMilliseconds() / 1000 % 60;
  }

  public long getYears() {
    return this.getMilliseconds() / 1000 / 60 / 60 / 24 / 365;
  }
}

@@ -201,32 +201,40 @@
 ) %7B%0D%0A    return 
+getDays(
 this.getMillisec
@@ -243,36 +243,9 @@
 ds()
- / 1000 / 60 / 60 / 24 %25 365
+)
 ;%0D%0A 
@@ -281,32 +281,41 @@
 ) %7B%0D%0A    return 
+getHours(
 this.getMillisec
@@ -324,30 +324,9 @@
 ds()
- / 1000 / 60 / 60 %25 24
+)
 ;%0D%0A 
@@ -471,32 +471,43 @@
 ) %7B%0D%0A    return 
+getMinutes(
 this.getMillisec
@@ -516,25 +516,94 @@
 ds()
- / 1000 / 60 %25 60
+);%0D%0A  %7D%0D%0A%0D%0A  public long getSeconds() %7B%0D%0A    return getSeconds(this.getMilliseconds())
 ;%0D%0A 
@@ -617,38 +617,36 @@
  public long get
-Second
+Year
 s() %7B%0D%0A    retur
@@ -639,32 +639,41 @@
 ) %7B%0D%0A    return 
+getYears(
 this.getMillisec
@@ -682,20 +682,101 @@
 ds()
- / 1000 %25 60
+);%0D%0A  %7D%0D%0A%0D%0A  public static long getDays(long ms) %7B%0D%0A    return ms / 1000 / 60 / 60 / 24 %25 365
 ;%0D%0A 
@@ -786,32 +786,39 @@
 %0A%0D%0A  public 
+static 
 long get
 Years() %7B%0D%0A 
@@ -809,52 +809,368 @@
  get
-Years() %7B%0D%0A    return this.getMilliseconds()
+Hours(long ms) %7B%0D%0A    return ms / 1000 / 60 / 60 %25 24;%0D%0A  %7D%0D%0A%0D%0A  public static long getMinutes(long ms) %7B%0D%0A    return ms / 1000 / 60 %25 60;%0D%0A  %7D%0D%0A%0D%0A  public static long getSeconds(long ms) %7B%0D%0A    return ms / 1000 %25 60;%0D%0A  %7D%0D%0A%0D%0A  public static long getMilliSeconds(long ms) %7B%0D%0A    return ms %25 1000;%0D%0A  %7D%0D%0A%0D%0A  public static long getYears(long ms) %7B%0D%0A    return ms
  / 1

Extend game time by static methods to get parts of a time format