提交 1f5a4ffe 编写于 作者: armink_ztl's avatar armink_ztl

[utilities][ulog] Increase the usec check time.

上级 1e36db0c
...@@ -268,6 +268,8 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta ...@@ -268,6 +268,8 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta
} }
#endif /* ULOG_USING_COLOR */ #endif /* ULOG_USING_COLOR */
log_buf[log_len] = '\0';
#ifdef ULOG_OUTPUT_TIME #ifdef ULOG_OUTPUT_TIME
/* add time info */ /* add time info */
{ {
...@@ -288,7 +290,7 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta ...@@ -288,7 +290,7 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta
{ {
long old_usec = now.tv_usec; long old_usec = now.tv_usec;
/* delay some time for wait microseconds changed */ /* delay some time for wait microseconds changed */
rt_thread_delay(2); rt_thread_mdelay(10);
gettimeofday(&now, NULL); gettimeofday(&now, NULL);
check_usec_support = RT_TRUE; check_usec_support = RT_TRUE;
/* the microseconds is not equal between two gettimeofday calls */ /* the microseconds is not equal between two gettimeofday calls */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册