public void BeginFrame() { if (this._cachedFrames.Count > 0) { this._curFrame = this._cachedFrames[this._cachedFrames.Count - 1]; this._cachedFrames.RemoveAt(this._cachedFrames.Count - 1); } else { this._curFrame = new PA_UIFrameStats(); } }
public void BeginFrame() { if (_cachedFrames.Count > 0) { _curFrame = _cachedFrames[_cachedFrames.Count - 1]; _cachedFrames.RemoveAt(_cachedFrames.Count - 1); } else { _curFrame = new PA_UIFrameStats(); } }
public void EndFrame() { this._lastSecFrames.Add(this._curFrame); this._curFrame = (PA_UIFrameStats)null; if ((double)(Time.get_realtimeSinceStartup() - this._lastWriteTime) < (double)PA_UIStatsConst.WriteInterval) { return; } Debug.LogWarning((object)this.GenerateStatsInfo()); for (int index = 0; index < this._lastSecFrames.Count; ++index) { this._lastSecFrames[index].Clear(); } this._cachedFrames.AddRange((IEnumerable <PA_UIFrameStats>) this._lastSecFrames); this._lastSecFrames.Clear(); this._lastWriteTime = Mathf.Floor(Time.get_realtimeSinceStartup()); }