From 07f8e4dd26d7260dc6f70792ab0751fa4e2649a7 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 23 Dec 2024 10:34:19 -0800 Subject: [PATCH] update duration for warn messages --- src/client/GameRunner.ts | 2 +- src/client/graphics/GameRenderer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/GameRunner.ts b/src/client/GameRunner.ts index 512ddffde..faf92c615 100644 --- a/src/client/GameRunner.ts +++ b/src/client/GameRunner.ts @@ -183,7 +183,7 @@ export class GameRunner { const start = performance.now() this.gs.executeNextTick() const duration = performance.now() - start - if (duration > 100) { + if (duration > 200) { console.warn(`tick ${this.gs.ticks() - 1} took ${duration}ms to execute`) } } catch (error) { diff --git a/src/client/graphics/GameRenderer.ts b/src/client/graphics/GameRenderer.ts index 513ee2c48..d91e7adef 100644 --- a/src/client/graphics/GameRenderer.ts +++ b/src/client/graphics/GameRenderer.ts @@ -143,7 +143,7 @@ export class GameRenderer { requestAnimationFrame(() => this.renderGame()); const duration = performance.now() - start - if (duration > 10) { + if (duration > 50) { console.warn(`tick ${this.game.ticks()} took ${duration}ms to render frame`) } }