improve ups counter output
This commit is contained in:
parent
7fd688177b
commit
2e9415693a
1 changed files with 19 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Reference in a new issue