diff options
Diffstat (limited to 'c/src/exec/libcsupport/src/__times.c')
-rw-r--r-- | c/src/exec/libcsupport/src/__times.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/c/src/exec/libcsupport/src/__times.c b/c/src/exec/libcsupport/src/__times.c index 3b23f3764a..7c06a879f1 100644 --- a/c/src/exec/libcsupport/src/__times.c +++ b/c/src/exec/libcsupport/src/__times.c @@ -27,8 +27,7 @@ clock_t _times( struct tms *ptms ) { - rtems_status_code status; - rtems_interval ticks; + rtems_interval ticks; if ( !ptms ) { errno = EFAULT; @@ -36,6 +35,12 @@ clock_t _times( } /* + * This call does not depend on TOD being initialized and can't fail. + */ + + (void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &ticks ); + + /* * RTEMS technically has no notion of system versus user time * since there is no separation of OS from application tasks. * But we can at least make a distinction between the number |