static long waitForBotStartUp_timeoutSeconds = 60; // returns address or fails static S waitForBotStartUp(S botName) { for (int i = 0; i < waitForBotStartUp_timeoutSeconds; i++) { sleepSeconds(i == 0 ? 0 : 1); S addr = getBotAddress(botName); if (addr != null) return addr; } throw fail("Bot not found: " + quote(botName)); }