From 96d155af60f6f69ef18c7cdf2667ff8d10d0360a Mon Sep 17 00:00:00 2001 From: walterlv Date: Thu, 22 Aug 2024 11:43:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=9B=B4=E5=A4=9A=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- samples/LoggerSample.MainApp/Program.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/LoggerSample.MainApp/Program.cs b/samples/LoggerSample.MainApp/Program.cs index d650f93..fec6569 100644 --- a/samples/LoggerSample.MainApp/Program.cs +++ b/samples/LoggerSample.MainApp/Program.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; using dotnetCampus.Logging.Attributes; @@ -37,13 +38,14 @@ public static void Main(string[] args) private static void Run() { - Log.Debug("[TEST] 开始"); + var stopwatch = Stopwatch.StartNew(); + Log.Debug($"[TEST] 开始 {stopwatch.ElapsedMilliseconds}ms"); Parallel.For(0, 0x00004000, i => { - Thread.Sleep(1); + Thread.Sleep(0); Log.Debug($"[TEST] {DateTime.Now:HH:mm:ss}"); }); - Log.Debug("[TEST] 完成"); + Log.Debug($"[TEST] 完成 {stopwatch.ElapsedMilliseconds}ms"); } }