示例#1
0
        public void Reset()
        {
            var clock = new ManualClock();
              clock.Start();
              clock.Update(new TimeSpan(100000));
              clock.Reset();

              Assert.IsFalse(clock.IsRunning);
              Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime);
              Assert.AreEqual(TimeSpan.Zero, clock.GameTime);
              Assert.AreEqual(TimeSpan.Zero, clock.TotalTime);

              clock.Start();
              clock.Update(new TimeSpan(100000));
              clock.Stop();
              clock.Reset();

              Assert.IsFalse(clock.IsRunning);
              Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime);
              Assert.AreEqual(TimeSpan.Zero, clock.GameTime);
              Assert.AreEqual(TimeSpan.Zero, clock.TotalTime);
        }
示例#2
0
        public void Reset()
        {
            var clock = new ManualClock();

            clock.Start();
            clock.Update(new TimeSpan(100000));
            clock.Reset();

            Assert.IsFalse(clock.IsRunning);
            Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime);
            Assert.AreEqual(TimeSpan.Zero, clock.GameTime);
            Assert.AreEqual(TimeSpan.Zero, clock.TotalTime);

            clock.Start();
            clock.Update(new TimeSpan(100000));
            clock.Stop();
            clock.Reset();

            Assert.IsFalse(clock.IsRunning);
            Assert.AreEqual(TimeSpan.Zero, clock.DeltaTime);
            Assert.AreEqual(TimeSpan.Zero, clock.GameTime);
            Assert.AreEqual(TimeSpan.Zero, clock.TotalTime);
        }