From 60d02096d9dc4bc9cb54f8cf81becd10a9dd0c61 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 24 十月 2023 16:22:47 +0800
Subject: [PATCH] L前3s囊括一次/增加L2数据接口/接口输出交易信息

---
 huaxin_client/l2_data_manager.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/huaxin_client/l2_data_manager.py b/huaxin_client/l2_data_manager.py
index ae0f6fe..f854c2c 100644
--- a/huaxin_client/l2_data_manager.py
+++ b/huaxin_client/l2_data_manager.py
@@ -208,10 +208,11 @@
                     l2_data_callback.OnL2Order(code, udatas, int(time.time() * 1000))
                     # l2_data_transaction_protocol.send_l2_order_detail(pipe, _mmap, code, udatas)
                     use_time = int((time.time() - start_time) * 1000)
-                    if use_time > 20:
+                    if use_time > 10:
                         async_log_util.info(logger_local_huaxin_l2_upload, f"{code}-涓婁紶浠g爜鑰楁椂锛歿use_time}ms")
-                time.sleep(0.01)
-
+                else:
+                    # 娌℃湁鏁版嵁鐨勬椂鍊欓渶绛夊緟锛屾湁鏁版嵁鏃朵笉闇�绛夊緟
+                    time.sleep(0.004)
             except Exception as e:
                 hx_logger_contact_debug.exception(e)
                 logger_local_huaxin_l2_error.error(f"涓婁紶璁㈠崟鏁版嵁鍑洪敊锛歿str(e)}")

--
Gitblit v1.8.0