improve ups counter output
This commit is contained in:
parent
b9508173b8
commit
a908979940
2 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue