Ejemplo n.º 1
0
 public void Start(string name)
 {
     if (!_stopwatch.IsRunning)
     {
         _stopwatch.Start();
     }
     if (_current == null)
     {
         _current = _root;
     }
     _current = _current.AddNew(name, _stopwatch.ElapsedMilliseconds);
 }
Ejemplo n.º 2
0
 public void End(string name)
 {
     _current.Close(name, _stopwatch.ElapsedMilliseconds);
     _current = _current.Parent;
 }
Ejemplo n.º 3
0
 public TimeSlot AddNew(string name, long milliseconds)
 {
     var ts = new TimeSlot(name, SlotStatus.Open, milliseconds);
     ts.Parent = this;
     _slots.Add(ts);
     return ts;
 }