LongoMatch.Core.Store.Timer.Stop C# (CSharp) Method

Stop() public method

public Stop ( Time stop ) : void
stop Time
return void
        public void Stop(Time stop)
        {
            if (Nodes.Count > 0) {
                TimeNode last = Nodes.Last ();
                if (last.Stop == null) {
                    last.Stop = stop;
                }
            }
            Nodes.OrderBy (tn => tn.Start.MSeconds);
        }

Usage Example

Beispiel #1
0
 public void TestCancelTimer()
 {
     Timer timer = new Timer { Name = "Test" };
     timer.Start (new Time (1000));
     timer.Stop (new Time (2000));
     timer.CancelCurrent ();
     Assert.AreEqual (1, timer.Nodes.Count);
     timer.Start (new Time (3000));
     Assert.AreEqual (2, timer.Nodes.Count);
     timer.CancelCurrent ();
     Assert.AreEqual (1, timer.Nodes.Count);
 }
All Usage Examples Of LongoMatch.Core.Store.Timer::Stop