summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
authorWangHuachen <[email protected]>2020-11-08 19:30:50 +0800
committerGitHub <[email protected]>2020-11-08 19:30:50 +0800
commit9756c77f0447f9ce4f00a37600298a1f1fd90cda (patch)
tree093247a1719c087dba33783be3a4ee44c1026b2d /components/utilities
parent9545529b33cbaae137f1e389dd0e3a5233d516da (diff)
parent4b2b9a87c6f0a87b125e5c5a18bcfcf663de9fbb (diff)
Merge pull request #1 from RT-Thread/master
同步原有仓库
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/ulog/syslog/syslog.c5
-rw-r--r--components/utilities/utest/utest.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/components/utilities/ulog/syslog/syslog.c b/components/utilities/ulog/syslog/syslog.c
index 7586148fbf..4c290bed52 100644
--- a/components/utilities/ulog/syslog/syslog.c
+++ b/components/utilities/ulog/syslog/syslog.c
@@ -11,6 +11,7 @@
#include <stdarg.h>
#include <ulog.h>
#include <rthw.h>
+#include <stdint.h>
#include "syslog.h"
#ifdef ULOG_OUTPUT_FLOAT
@@ -192,10 +193,10 @@ RT_WEAK rt_size_t syslog_formater(char *log_buf, int level, const char *tag, rt_
#ifdef ULOG_OUTPUT_LEVEL
rt_snprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE - log_len, "<%d>%s%3d %02d:%02d:%02d", level,
- get_month_str(tm->tm_mon + 1), tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, rt_tick_get() % 1000);
+ get_month_str(tm->tm_mon + 1), tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
#else
rt_snprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE - log_len, "%s%3d %02d:%02d:%02d",
- get_month_str(tm->tm_mon + 1), tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, rt_tick_get() % 1000);
+ get_month_str(tm->tm_mon + 1), tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
#endif /* ULOG_OUTPUT_LEVEL */
log_len += rt_strlen(log_buf + log_len);
diff --git a/components/utilities/utest/utest.h b/components/utilities/utest/utest.h
index 2c91bfe0e1..8d83fa3184 100644
--- a/components/utilities/utest/utest.h
+++ b/components/utilities/utest/utest.h
@@ -12,6 +12,7 @@
#define __UTEST_H__
#include <rtthread.h>
+#include <stdint.h>
#include "utest_log.h"
#include "utest_assert.h"