Exemplo n.º 1
0
 private static XElement ToXElement(ProfilerRecord record)
 {
     return(new XElement("R",
                         new XAttribute("code", record.Code),
                         new XAttribute("type", record.IsStart? "start" : "end"),
                         record.TimeStamp));
 }
Exemplo n.º 2
0
            //****************************************

            public SectionState(TimeSpan interval, TimeSpan time, ProfilerRecord current = default, ProfilerRecord previous = default)
            {
                _Interval = interval;
                _Current  = current;
                _Previous = previous;

                if (interval == TimeSpan.Zero)
                {
                    _Time = time;
                }
                else
                {
                    _Time = RoundTo(time, interval);
                }
            }