public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } FreeTimeDebug.ActionTime other = (FreeTimeDebug.ActionTime)obj; if (action == null) { if (other.action != null) { return(false); } } else { if (!action.Equals(other.action)) { return(false); } } if (startTime != other.startTime) { return(false); } return(true); }
private static void ComputeRealTime() { FreeTimeDebug.ActionTime last = null; FreeTimeDebug.ActionTime[] ats = triggerTime.Keys.ToArray(); foreach (FreeTimeDebug.ActionTime at in ats) { at.time = triggerTime[at]; at.realTime = at.time; if (last == null) { last = at; } if (last != at) { if (last.deep < at.deep) { at.parent = last; last.AddChild(at); } else { if (last.deep == at.deep) { at.parent = last.parent; if (at.parent != null) { at.parent.AddChild(at); } } else { if (last.deep > at.deep) { FreeTimeDebug.ActionTime root = last; while (root != null) { if (root.deep == at.deep - 1) { at.parent = root; root.AddChild(at); } root = root.parent; } } } } last = at; } } foreach (FreeTimeDebug.ActionTime at_1 in triggerTime.Keys) { at_1.Compute(); realTotalTime.AddKey(at_1.action, at_1.realTime); } }
public virtual void AddChild(FreeTimeDebug.ActionTime time) { this.children.Add(time); }