void (@Nullable Project project) { timer.stop(); ApplicationManager .getApplication() .invokeLater(() -> { Notifications.Bus.notify(getDelayNotification(timer.getTotalTime(), timer.getAverageDelay(), timer.getLongestDelay()), project); if (!isCanceled && ProfilersController.getInstance().isStoppedByScript()) { new FinishScriptDialog(project).show(); } }); }