void (ProjectScanningHistoryImpl scanningHistory, ProjectScanningHistoryImpl.Stage scanningStage, boolean isStart) { ProgressManager.checkCanceled(); Instant scanningStageTime = Instant.now(); if (isStart) { scanningHistory.startStage(scanningStage, scanningStageTime); } else { scanningHistory.stopStage(scanningStage, scanningStageTime); } ProgressManager.checkCanceled(); }