timer and delay skip current frame

This commit is contained in:
neuecc
2020-06-09 11:25:45 +09:00
parent 4d4466e801
commit 0c33977f5a
13 changed files with 1130 additions and 448 deletions

View File

@@ -269,7 +269,8 @@ namespace Cysharp.Threading.TasksTests
var first = Time.frameCount;
var canceled = await UniTask.DelayFrame(100, cancellationToken: cts.Token).SuppressCancellationThrow();
(Time.frameCount - first).Should().Be(11); // 10 frame canceled
var r = (Time.frameCount - first);
(9 < r && r < 11).Should().BeTrue();
canceled.Should().Be(true);
});