如果getInt正常,则删除日志文件

lowmem
Matthew 1 month ago
parent ba37692f73
commit ab438f68b8

@ -51,8 +51,15 @@ public:
~GpioDebugLogger() ~GpioDebugLogger()
{ {
uint64_t ts = (GetMicroTimeStamp() - m_startTime); uint64_t ts = (GetMicroTimeStamp() - m_startTime);
if (ts > 1000)
CreateEmptyFile(m_path + ".leave." + std::to_string(ts)); {
CreateEmptyFile(m_path + ".leave." + std::to_string(ts));
}
else
{
std::string path = m_path + ".enter";
std::remove(path.c_str());
}
} }
private: private:

Loading…
Cancel
Save