From f6ddbc47d088d102fbd622c93286b63a3a081456 Mon Sep 17 00:00:00 2001 From: xinyang <895639507@qq.com> Date: Wed, 14 Aug 2019 12:00:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0log.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- others/include/log.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/others/include/log.h b/others/include/log.h index d25a61c..39b6ba4 100644 --- a/others/include/log.h +++ b/others/include/log.h @@ -24,6 +24,8 @@ // arguments: tag:显示代码块执行时间前的用户信息,支持printf格式化字符串 // codes:需要被统计时间的代码块 // attention: 代码块内定义的局部变量作用域仅限于该代码块 +// 代码块内不支持使用break,continue语句,将无法达到预想效果 +// 支持多出口离开代码块都能显示代码块执行时间 // #ifndef _LOG_H_ #define _LOG_H_ @@ -155,7 +157,7 @@ /******************** the time counter API ************************/ #if !defined(DO_NOT_CNT_TIME) && LOG_LEVEL > LOG_NONE #define CNT_TIME(tag, codes, ...) do{ \ - class TimeCounter{ \ + class { \ private: \ systime begin; \ public: \