void (long timeout, @NotNull TimeUnit unit) { try { @NotNull GlobalEventExecutor executor = GlobalEventExecutor.INSTANCE; executor.awaitInactivity(timeout, unit); } catch (InterruptedException ignored) { } catch (IllegalStateException ignored) { // thread did not start } }