示例#1
0
		public void CalculateFpsWithStopwatch()
		{
			time = new StopwatchTime();
			const int TargetFps = 30;
			do
			{
				Thread.Sleep(1000 / TargetFps);
				time.Update();
			} while (time.Milliseconds < 1000);
			Assert.IsTrue(Math.Abs(time.Fps - TargetFps) <= 5, "Fps=" + time.Fps);
		}
示例#2
0
 public void Dispose()
 {
     Current = null;
 }
示例#3
0
 protected GlobalTime()
 {
     Current = this;
     SetFpsTo60InitiallyAndSetUsefulInitialValues();
 }
示例#4
0
		public void Dispose()
		{
			Current = null;
		}
示例#5
0
		protected GlobalTime()
		{
			Current = this;
			SetFpsTo60InitiallyAndSetUsefulInitialValues();
		}
示例#6
0
		public void RunTimeWithStopwatch()
		{
			time = new StopwatchTime();
			time.Update();
			Assert.IsTrue(time.Milliseconds < 2, "Milliseconds=" + time.Milliseconds);
		}