const timerDuration = luxon.Duration.fromObject({ minutes: 1 });
const endTime = luxon.DateTime.local().plus(timerDuration);
const checkStillThere = async () => {
while (luxon.DateTime.local() < endTime) {
if (workflow.stillThere) {
break;
}
await new Promise(resolve => setTimeout(resolve, 1000));
}
};
await checkStillThere();