Identifying time delays in batch manufacturing for accurate anomaly detection