stopwatch.Start();
****主方法
log.Add("WriteLoginLog" + stopwatch.Elapsed.TotalSeconds.ToString() + "当前时间" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
stopwatch.Reset();
stopwatch.Elapsed.TotalSeconds.ToString()为执行时间
stopwatch.Start();
****主方法
log.Add("WriteLoginLog" + stopwatch.Elapsed.TotalSeconds.ToString() + "当前时间" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"));
stopwatch.Reset();
stopwatch.Elapsed.TotalSeconds.ToString()为执行时间