You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/19 20:44:19 UTC

[GitHub] [nuttx] acassis commented on a diff in pull request #8196: time.h: Add CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID definition

acassis commented on code in PR #8196:
URL: https://github.com/apache/nuttx/pull/8196#discussion_r1081845991


##########
include/time.h:
##########
@@ -64,28 +64,38 @@
  * forward and backward as the system time-of-day clock is changed.
  */
 
-#define CLOCK_REALTIME     0
+#define CLOCK_REALTIME            0
 
 /* Clock that cannot be set and represents monotonic time since some
  * unspecified starting point. It is not affected by changes in the
  * system time-of-day clock.
  */
 
-#define CLOCK_MONOTONIC    1
+#define CLOCK_MONOTONIC           1
+
+/* Clock that measures CPU time consumed by this process (i.e., CPU
+ * time consumed by all threads in the process).
+ */
+
+#define CLOCK_PROCESS_CPUTIME_ID  2
+
+/* Clock that measures CPU time consumed by this thread */
+
+#define CLOCK_THREAD_CPUTIME_ID   3
 
 /* Monotonic system-wide clock that includes time spent in suspension. */
 
-#define CLOCK_BOOTTIME     2
+#define CLOCK_BOOTTIME            7

Review Comment:
   Why to use 7 instead of 4? Are you planing to add later symbols from 4 to 6 ?



-- 
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: commits-unsubscribe@nuttx.apache.org

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