mirror of
https://github.com/imgfloat/server.git
synced 2026-02-05 11:49:25 +00:00
60 fps ticks
This commit is contained in:
@@ -5,6 +5,7 @@ let channelName = "";
|
||||
let tickIntervalId = null;
|
||||
let lastTick = 0;
|
||||
let startTime = 0;
|
||||
const tickIntervalMs = 1000 / 60;
|
||||
const errorKeys = new Set();
|
||||
|
||||
function reportScriptError(id, stage, error) {
|
||||
@@ -68,7 +69,7 @@ function ensureTickLoop() {
|
||||
console.error(`Script ${script.id} tick failed`, error);
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}, tickIntervalMs);
|
||||
}
|
||||
|
||||
function stopTickLoopIfIdle() {
|
||||
|
||||
Reference in New Issue
Block a user