diff --git a/Program.cs b/Program.cs index 2a00a27..9d07485 100644 --- a/Program.cs +++ b/Program.cs @@ -67,7 +67,7 @@ new Thread(Tick).Start(); await app.RunAsync(); return; -void Tick() +async void Tick() { app.Services.QueryComponents(out ILogger logger); while (true) @@ -81,7 +81,9 @@ void Tick() logger.LogCritical(exception,exception.Message); } - Thread.Sleep(16); + //logger.LogInformation("wait next frame"); + await Task.Delay(16); } - + + logger.LogCritical("程序已退出,不应该出现"); } \ No newline at end of file