コード例 #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
ファイル: GlobalTime.cs プロジェクト: whztt07/DeltaEngine
		public void Dispose()
		{
			Current = null;
		}
コード例 #5
0
ファイル: GlobalTime.cs プロジェクト: whztt07/DeltaEngine
		protected GlobalTime()
		{
			Current = this;
			SetFpsTo60InitiallyAndSetUsefulInitialValues();
		}
コード例 #6
0
		public void RunTimeWithStopwatch()
		{
			time = new StopwatchTime();
			time.Update();
			Assert.IsTrue(time.Milliseconds < 2, "Milliseconds=" + time.Milliseconds);
		}