improve ups counter output

This commit is contained in:
Vinzenz Schroeter 2024-04-30 11:16:26 +02:00 committed by RobbersDaughter
parent b9508173b8
commit a908979940
2 changed files with 19 additions and 9 deletions

View file

@ -33,12 +33,14 @@ internal sealed class GameTickWorker(
private async Task RunAsync()
{
// the first tick is really short (< 0.01ms) if this line is directly above the while
var sw = Stopwatch.StartNew();
// do not block in StartAsync
await Task.Delay(1).ConfigureAwait(false);
try
{
var sw = new Stopwatch();
while (!_cancellation.IsCancellationRequested)
{
var delta = sw.Elapsed;