| | |
| | | import com.zy.acs.manager.manager.service.AgvService; |
| | | import com.zy.acs.manager.manager.service.CodeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang.time.StopWatch; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.core.io.Resource; |
| | |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.PreDestroy; |
| | | import java.io.*; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.StandardCopyOption; |
| | | import java.util.List; |
| | |
| | | Integer lev = MapDataDispatcher.MAP_DEFAULT_LEV; |
| | | boolean lockAcquired = false; |
| | | |
| | | StopWatch stopWatch = new StopWatch(); |
| | | stopWatch.start(); |
| | | long startTime = System.currentTimeMillis(); |
| | | |
| | | try { |
| | | if (!(lockAcquired = lock.tryLock(LOCK_TIMEOUT, TimeUnit.SECONDS))) { |
| | |
| | | lock.unlock(); |
| | | } |
| | | |
| | | stopWatch.stop(); |
| | | if (stopWatch.getTime() > 0) { |
| | | if (stopWatch.getTime() > 50) { |
| | | log.info("滤波函数花费时间为:{}毫秒......", stopWatch.getTime()); |
| | | } |
| | | long during = System.currentTimeMillis() - startTime; |
| | | if (during > 50) { |
| | | log.info("滤波函数花费时间为:{}毫秒......", during); |
| | | } |
| | | } |
| | | } |