Sam Price commented on a discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/864#note_142782

 > +  uint32_t            seconds_used;
 > +  uint32_t            microseconds_used;
 >  
 > -  used = _Thread_Get_CPU_time_used_after_last_reset( the_thread );
 > -  _TOD_Get_uptime( &uptime );
 > -  _Timestamp_Subtract( &ctx->uptime_at_last_reset, &uptime, &ctx->total );
 > -  _Timestamp_Divide( &used, &ctx->total, &ival, &fval );
 > -  seconds = _Timestamp_Get_seconds( &used );
 > -  nanoseconds = _Timestamp_Get_nanoseconds( &used ) /
 > -                TOD_NANOSECONDS_PER_MICROSECOND;
 > +  total = cpu_usage_total_cpu_time();
 > +  cpu_usage_populate( the_thread, &total, &info );
 > +
 > +  _Thread_Get_name( the_thread, name, sizeof( name ) );
 > +  seconds_used = _Timestamp_Get_seconds( &info.task_total );
 > +  microseconds_used = _Timestamp_Get_nanoseconds(

Thought it would be better to use the api calls and get code coverage on them.

I can revert the changes to the cpu use printers.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/864#note_142782
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to