Esempio n. 1
0
 public void Start(string name)
 {
     if (!_stopwatch.IsRunning)
     {
         _stopwatch.Start();
     }
     if (_current == null)
     {
         _current = _root;
     }
     _current = _current.AddNew(name, _stopwatch.ElapsedMilliseconds);
 }
Esempio n. 2
0
 public void End(string name)
 {
     _current.Close(name, _stopwatch.ElapsedMilliseconds);
     _current = _current.Parent;
 }
Esempio 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;
 }