chore: log when worldState time is behind real time + make sure client knows fissures are active #2562

Merged
Sainan merged 4 commits from time-constraints-polish into main 2025-07-30 01:49:35 -07:00
Showing only changes of commit 2054a56620 - Show all commits

View File

@ -1336,6 +1336,12 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
}
}
const timeSecs = getIdealTimeSatsifyingConstraints(constraints);
if (constraints.length != 0) {
const delta = Math.trunc(Date.now() / 1000) - timeSecs;
if (delta != 0) {
logger.debug(`reported time is ${delta} seconds behind real time to satisfy selected constraints`);
}
}
const timeMs = timeSecs * 1000;
const day = Math.trunc((timeMs - EPOCH) / 86400000);
const week = Math.trunc(day / 7);