xiaoxiang781216 commented on code in PR #21644:
URL: https://github.com/apache/nuttx/pull/21644#discussion_r4532469380
##########
fs/procfs/fs_procfscritmon.c:
##########
@@ -329,7 +329,8 @@ static ssize_t critmon_read_cpu(FAR struct critmon_file_s
*attr,
all_time.tv_nsec = 0;
}
- elapsed = clock_systime_ticks() * CONFIG_USEC_PER_TICK;
+ elapsed = (clock_systime_ticks() - INITIAL_SYSTEM_TIMER_TICKS) *
Review Comment:
why not remove INITIAL_SYSTEM_TIMER_TICKS directly? tick is always 64bit
now and then impossible to overflow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]