summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c
index 353f2fcf46..334c8803ed 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -269,6 +269,10 @@ static rt_err_t _thread_init(struct rt_thread *thread,
rt_list_init(&thread->signal.sig_queue.siginfo_list);
rt_memset(&thread->user_ctx, 0, sizeof thread->user_ctx);
+
+ /* initialize user_time and system_time */
+ thread->user_time = 0;
+ thread->system_time = 0;
#endif
#ifdef RT_USING_CPU_USAGE