Make.defines.linux | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
algorithm/IndirectAlg.c | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
test/test_right_walk | 补丁 | 查看 | 原始文档 | blame | 历史 | |
test/test_right_walk3 | 补丁 | 查看 | 原始文档 | blame | 历史 | |
test/test_right_walk3.c | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Make.defines.linux
@@ -9,7 +9,7 @@ LDFLAGS= CFLAGS = $(INCLUDE) -I. -I./include -I$(ROOT)/common -std=c++11 -mcx16 -Wall -DLINUX -D_GNU_SOURCE $(EXTRA) CFLAGS = $(INCLUDE) -I. -I./include -I$(ROOT)/common -I$(ROOT)/common/include -g -std=c++11 -mcx16 -Wall -DLINUX -D_GNU_SOURCE $(EXTRA) ifeq ($(pic),y) CFLAGS += -fPIC algorithm/IndirectAlg.c
@@ -81,18 +81,21 @@ while (!mterminate.load()) { std::this_thread::sleep_for(std::chrono::seconds(this->keepTime * 2)); //sleep(this->keepTime); for(iter = statusMap.begin(); iter != statusMap.end(); iter++) { for(iter = statusMap.begin(); iter != statusMap.end();) { status = iter->second; if (status != nullptr) { // cout<< "iter " << iter->first <<' '<< iter->second << status->lastTime << endl; // printf("%ld, %ld, %ld\n", time(NULL), status->lastTime, (time(0) - status->lastTime)); if(difftime(time(NULL), status->lastTime) > this->keepTime*2) { if(difftime(time(NULL), status->lastTime) > this->keepTime * 2) { std::cout << status->id << "脱离监控区, remove from map\n"; delete status; statusMap.erase(iter); } iter = statusMap.erase(iter); continue; } } iter++; } } test/test_right_walkBinary files differ
test/test_right_walk3Binary files differ
test/test_right_walk3.c
@@ -94,7 +94,7 @@ void test3() { std::ifstream fin("test2.txt"); std::ifstream fin("test3.txt"); char line[1024]; //std::string line; char *targetIdStr;