Skip to content

Commit

Permalink
Update rtems_sysmon.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Van committed Jul 29, 2023
1 parent 3675ce0 commit ebc65d7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fsw/modules/rtems_sysmon/rtems_sysmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ void rtems_sysmon_update_stat(rtems_sysmon_cpuload_state_t *state)
rtems_task rtems_sysmon_Task(rtems_task_argument arg)
{
rtems_sysmon_cpuload_state_t* state = (rtems_sysmon_cpuload_state_t *)arg;

OS_time_t curr_sample;
OS_time_t next_sample;
int msec_diff;
int i;

/* Initialize */
Expand All @@ -230,11 +226,8 @@ rtems_task rtems_sysmon_Task(rtems_task_argument arg)

while (state->should_run)
{
CFE_PSP_GetTime(&curr_sample);
next_sample = OS_TimeAdd(curr_sample, OS_TimeFromTotalSeconds(RTEMS_SYSMON_SAMPLE_DELAY));
msec_diff = OS_TimeGetTotalMilliseconds(OS_TimeSubtract(next_sample, curr_sample));

usleep(msec_diff);
OS_TaskDelay(RTEMS_SYSMON_SAMPLE_DELAY);
rtems_sysmon_update_stat(state);
}

Expand Down

0 comments on commit ebc65d7

Please sign in to comment.