From ab438f68b85429352b234aab517dc79d36e502a1 Mon Sep 17 00:00:00 2001 From: Matthew Date: Mon, 5 May 2025 22:35:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=9E=9CgetInt=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=EF=BC=8C=E5=88=99=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/GPIOControl.cpp b/app/src/main/cpp/GPIOControl.cpp index e1dfbd5d..4d1e9dcd 100644 --- a/app/src/main/cpp/GPIOControl.cpp +++ b/app/src/main/cpp/GPIOControl.cpp @@ -51,8 +51,15 @@ public: ~GpioDebugLogger() { uint64_t ts = (GetMicroTimeStamp() - m_startTime); - - CreateEmptyFile(m_path + ".leave." + std::to_string(ts)); + if (ts > 1000) + { + CreateEmptyFile(m_path + ".leave." + std::to_string(ts)); + } + else + { + std::string path = m_path + ".enter"; + std::remove(path.c_str()); + } } private: