admin
2022-09-30 1a16b19acb23a4f28bafd01f3ed80fb225a96c3e
ConsoleApplication/L2DataCapture.cpp
@@ -48,9 +48,11 @@
         string code = gpCodes[index];
         try {
            clock_t start = clock();
            list<TradeData> resultList = captureLevel2TradeData(CaptureUtil::capture(index, CAPTURE_TYPE_L2), index);
            data_callback(index, code, resultList, context);
            cout << "时间消耗:" << clock() - start << endl;
            cv::Mat mat = CaptureUtil::capture(index, CAPTURE_TYPE_L2);
            list<TradeData> resultList = captureLevel2TradeData(mat, index);
            long processTime = clock() - start;
            data_callback(index, code, start , processTime, resultList, context);
            cout << "时间消耗:" << processTime << endl;
         }
         catch (...) {
@@ -80,11 +82,9 @@
}
void L2DataCapture::setGPCode(int index, string code) {
   int length = sizeof(gpCodes) / sizeof(gpCodes[0]);
   if (length <= index) {
   if (THS_FRAME_COUNT <= index) {
      return;
   }
   gpCodes[index] = code;
}
@@ -198,7 +198,7 @@
   list<TradeData> resultList=  captureLevel2TradeData(openCLExcuter[identify], oimg, identify);
   std::cout << "-------L2行情识别结束任务: threadid-" << std::this_thread::get_id() << "  序号:" << identify << " 耗时:" << clock() - starttime  <<"  数据量:"<< resultList.size() << endl;
   std::cout << "-------L2行情识别结束任务: threadid-" << std::this_thread::get_id() << "  序号:" << identify << " CODE:"<< gpCodes[identify] << " 耗时:" << clock() - starttime  <<"  数据量:"<< resultList.size() << endl;
   return resultList;
}