mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-27 02:40:08 +00:00
timer and delay skip current frame
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user