public static void Begin(string s, Stream stream, bool autoClosing) { if (!hasClosed && profiles.ContainsKey(lastOpen)) { End(lastOpen, stream); } ProfileSizePoint p = new ProfileSizePoint(); if (!profiles.ContainsKey(s)) { profiles[s] = new ProfileSizePoint(); } else { p = profiles[s]; } if (p.open) { Debug.LogWarning("Opening an already open entry (" + s + ")"); } p.lastBegin = stream.Position; p.open = true; if (autoClosing) { hasClosed = false; lastOpen = s; } profiles[s] = p; }
public static void Begin (string s, Stream stream, bool autoClosing) { if (!hasClosed && profiles.ContainsKey(lastOpen)) { End (lastOpen, stream); } ProfileSizePoint p = new ProfileSizePoint (); if (!profiles.ContainsKey (s)) { profiles[s] = new ProfileSizePoint (); } else { p = profiles[s]; } if (p.open) { Debug.LogWarning ("Opening an already open entry ("+s+")"); } p.lastBegin = stream.Position; p.open = true; if (autoClosing) { hasClosed = false; lastOpen = s; } profiles[s] = p; }