Skip to content

Commit 1f5a4ff

Browse files
committed
[utilities][ulog] Increase the usec check time.
1 parent 1e36db0 commit 1f5a4ff

File tree

1 file changed

+3
-1
lines changed
  • components/utilities/ulog

1 file changed

+3
-1
lines changed

components/utilities/ulog/ulog.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta
268268
}
269269
#endif /* ULOG_USING_COLOR */
270270

271+
log_buf[log_len] = '\0';
272+
271273
#ifdef ULOG_OUTPUT_TIME
272274
/* add time info */
273275
{
@@ -288,7 +290,7 @@ RT_WEAK rt_size_t ulog_formater(char *log_buf, rt_uint32_t level, const char *ta
288290
{
289291
long old_usec = now.tv_usec;
290292
/* delay some time for wait microseconds changed */
291-
rt_thread_delay(2);
293+
rt_thread_mdelay(10);
292294
gettimeofday(&now, NULL);
293295
check_usec_support = RT_TRUE;
294296
/* the microseconds is not equal between two gettimeofday calls */

0 commit comments

Comments
 (0)