nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #969: Refine the nuttx internal function
Date Tue, 05 May 2020 18:11:24 GMT

xiaoxiang781216 commented on pull request #969:
URL: https://github.com/apache/incubator-nuttx/pull/969#issuecomment-624219748


   > > This change is too arbritrary. I don't think we should permit arbitrary changes
with no justification.
   > 
   > We have two similar functions:
   > 1.clock_systimespec return timespec(second plus nanosecond)
   > 2.clock_systimer return clock tick
   > These two functions return the same value but with different time unit.
   > So I think clock_systimetick is a better name becuase:
   > 1.Align with clock_systimespec
   > 2.Reader can know the time unit immediately
   > 3.All other related timing function use 'time', it's very strange that we use 'timer'
here.
   > 
   > > The system tick counter is referred to as the system timer or systimer in all
documentation. If you just wanat to add a units to the name, an underbar would make that clearer.
perhaps clock_systimer_tick?
   > 
   > timer is generally used to represent the event or callback happen in the furture,
e.g.:
   > getitimer/setitimer/timer_create/timer_settime..
   > time is used to represent the timing or clocking:
   > clock_gettime/clock_settime/time...
   > That is why I drop 'r' and add tick to clock_systimer which make it's more consistent
with POSIX naming convention.
   
   @patacongo do you think the justification is enough or I remove "Rename clock_systimer
to clock_systimetick" from the PR?
   I am fine if you still think the clock_systimer is better than clock_systimetick.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message