summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereset.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/cpuuse/cpuusagereset.c')
-rw-r--r--cpukit/libmisc/cpuuse/cpuusagereset.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c
index 10d8ebec48..d1f0e65180 100644
--- a/cpukit/libmisc/cpuuse/cpuusagereset.c
+++ b/cpukit/libmisc/cpuuse/cpuusagereset.c
@@ -40,7 +40,8 @@ static bool CPU_usage_Per_thread_handler(
scheduler = _Thread_Scheduler_get_home( the_thread );
_Scheduler_Acquire_critical( scheduler, &scheduler_lock_context );
- _Timestamp_Set_to_zero( &the_thread->cpu_time_used );
+ the_thread->cpu_time_used_at_last_reset =
+ _Thread_Get_CPU_time_used_locked( the_thread );
_Scheduler_Release_critical( scheduler, &scheduler_lock_context );
_Thread_State_release( the_thread, &state_lock_context );