From f204e9b4dcd8d329d5cd6bd44f957f4f74449d0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 23 Apr 2023 02:13:48 +0200 Subject: [PATCH] test: use monotonic timer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- test/utils/UtilsTest.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index 9bf70802..5732e57e 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -17,9 +17,9 @@ describe('Utils test suite', () => { }); it('Verify sleep()', async () => { - const start = Date.now(); + const start = performance.now(); await Utils.sleep(1000); - const end = Date.now(); + const end = performance.now(); expect(end - start).toBeGreaterThanOrEqual(1000); }); -- 2.34.1