Beispiel #1
0
        private void Write(string text)
        {
            var time       = showTimestamp ? clock.Load() + " " : "";
            var difference = "";

            if (showTimeDifference)
            {
                var t    = clock.Load();
                var diff = t - lastTime;
                lastTime   = t;
                difference = string.Format("~{0:000000}ms ", diff.TotalMilliseconds);
            }

            var message = text.Replace(Environment.NewLine, Environment.NewLine + "\t");

            Writer.AppendLine(time + difference + GetIndentation() + message);
        }
Beispiel #2
0
        private void Write(string text)
        {
            var time       = showTimestamp ? clock.Load().ToString() + " " : "";
            var difference = "";

            if (showTimeDifference)
            {
                var t    = clock.Load();
                var diff = t - lastTime;
                lastTime   = t;
                difference = string.Format("~{0:000000}ms ", diff.TotalMilliseconds);
            }

            Writer.AppendLine(time + difference + GetIndentation() + text);
        }