/// <summary> /// 创建事件 /// </summary> /// <param name="e"></param> public void NewEven(Even e) { Evens.Add(e); #region 时间间隔(毫秒计算) var count = Evens.Count; if (count > 2) { var preItem = Evens[count - 2]; var curItem = Evens[count - 1]; preItem.TimeSpanInMilliseconds = MilliSecondTimer.TimeSpanInMilliseconds(preItem.Time, curItem.Time); } #endregion }
/// <summary> /// 创建事件 /// </summary> /// <param name="e"></param> public void NewEven(Even e) { Evens.Add(e); #region 时间间隔(毫秒计算) var count = Evens.Count; if (count > 2) { var preItem = Evens[count - 2]; var curItem = Evens[count - 1]; preItem.TimeSpanInMilliseconds = MilliSecondTimer.TimeSpanInMilliseconds(preItem.Time, curItem.Time); } #endregion }
private static string PlainTextEven(Even e, int n) { n++; var text = ""; var countT = e.Transactions.Count; var currentT = e.Transactions; for (int i = 0; i < countT; i++) { var item = currentT[i]; var textTransaction = PlainTextSpace(n) + string.Format("--T--名称={0}({4}ms);类型={1};分类={2};时间={3:HH:mm:ss ffff}。", item.Name, item.Type,item.Category, item.Time, item.TimeSpanInMilliseconds); text = text + textTransaction + PlainTextTransaction(item, n); } return text; }