Changeset 16db540a in rtems


Ignore:
Timestamp:
Oct 12, 2017, 5:23:51 AM (21 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
2ae0acb
Parents:
58500540
git-author:
Sebastian Huber <sebastian.huber@…> (10/12/17 05:23:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/12/17 05:24:44)
Message:

Use right time format in _times()

Update #2740.
Close #3179.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/__times.c

    r58500540 r16db540a  
    4444)
    4545{
    46   uint32_t       tick_interval;
    47   struct bintime binuptime;
    48   sbintime_t     uptime;
    49   struct bintime bin_cpu_time_used;
    50   sbintime_t     cpu_time_used;
     46  uint32_t   tick_interval;
     47  sbintime_t uptime;
     48  sbintime_t cpu_time_used;
    5149
    5250  if ( !ptms )
     
    5856  ptms = memset( ptms, 0, sizeof( *ptms ) );
    5957
    60   _TOD_Get_zero_based_uptime( &binuptime );
    61   uptime = bttosbt( binuptime );
     58  _TOD_Get_zero_based_uptime( &uptime );
    6259  ptms->tms_stime = ((clock_t) uptime) / tick_interval;
    6360
     
    6966   *  this thread.
    7067   */
    71   _Thread_Get_CPU_time_used( _Thread_Get_executing(), &bin_cpu_time_used );
    72   cpu_time_used = bttosbt( bin_cpu_time_used );
     68  _Thread_Get_CPU_time_used( _Thread_Get_executing(), &cpu_time_used );
    7369  ptms->tms_utime = ((clock_t) cpu_time_used) / tick_interval;
    7470
Note: See TracChangeset for help on using the changeset viewer.