diff options
Diffstat (limited to 'cpukit/libmisc/cpuuse/cpuusagereset.c')
-rw-r--r-- | cpukit/libmisc/cpuuse/cpuusagereset.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagereset.c b/cpukit/libmisc/cpuuse/cpuusagereset.c index 233631dda2..80c041e3fe 100644 --- a/cpukit/libmisc/cpuuse/cpuusagereset.c +++ b/cpukit/libmisc/cpuuse/cpuusagereset.c @@ -28,18 +28,17 @@ static void CPU_usage_Per_thread_handler( Thread_Control *the_thread ) { - #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); #else the_thread->cpu_time_used = 0; #endif } - /* * External data that is shared by cpu usage code but not declared in .h files. */ -#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS +#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ extern Timestamp_Control CPU_usage_Uptime_at_last_reset; #else extern uint32_t CPU_usage_Ticks_at_last_reset; @@ -50,7 +49,7 @@ static void CPU_usage_Per_thread_handler( */ void rtems_cpu_usage_reset( void ) { - #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS + #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset ); _Thread_Time_of_last_context_switch = CPU_usage_Uptime_at_last_reset; #else |