We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbfc583 commit 96d155aCopy full SHA for 96d155a
samples/LoggerSample.MainApp/Program.cs
@@ -1,4 +1,5 @@
1
using System;
2
+using System.Diagnostics;
3
using System.Threading;
4
using System.Threading.Tasks;
5
using dotnetCampus.Logging.Attributes;
@@ -37,13 +38,14 @@ public static void Main(string[] args)
37
38
39
private static void Run()
40
{
- Log.Debug("[TEST] 开始");
41
+ var stopwatch = Stopwatch.StartNew();
42
+ Log.Debug($"[TEST] 开始 {stopwatch.ElapsedMilliseconds}ms");
43
Parallel.For(0, 0x00004000, i =>
44
- Thread.Sleep(1);
45
+ Thread.Sleep(0);
46
Log.Debug($"[TEST] {DateTime.Now:HH:mm:ss}");
47
});
- Log.Debug("[TEST] 完成");
48
+ Log.Debug($"[TEST] 完成 {stopwatch.ElapsedMilliseconds}ms");
49
}
50
51
0 commit comments