Merge pull request #12074 from RoosterDragon/runtime-long

Change Game.RunTime to a long to prevent overflow
This commit is contained in:
Oliver Brakmann
2016-09-21 18:07:52 +02:00
committed by GitHub
12 changed files with 25 additions and 20 deletions

View File

@@ -96,7 +96,7 @@ namespace OpenRA
// More accurate replacement for Environment.TickCount
static Stopwatch stopwatch = Stopwatch.StartNew();
public static int RunTime { get { return (int)stopwatch.ElapsedMilliseconds; } }
public static long RunTime { get { return stopwatch.ElapsedMilliseconds; } }
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return OrderManager.NetFrameNumber; } }
@@ -735,7 +735,7 @@ namespace OpenRA
}
}
else
Thread.Sleep(nextUpdate - now);
Thread.Sleep((int)(nextUpdate - now));
}
}