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 2021/10/19 13:24:07 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #4693: time: Typedef time_t to uint64_t if CONFIG_SYSTEM_TIME64 is defined

patacongo commented on a change in pull request #4693:
URL: https://github.com/apache/incubator-nuttx/pull/4693#discussion_r731862198



##########
File path: include/time.h
##########
@@ -102,7 +102,12 @@
 
 /* Scalar types */
 
+#ifdef CONFIG_SYSTEM_TIME64
+typedef uint64_t  time_t;         /* Holds time in seconds */
+#else
 typedef uint32_t  time_t;         /* Holds time in seconds */
+#endif
+

Review comment:
       CONFIG_SYSTEM_TIME64 determines if the high precision system timer is 32- or 32-bits with.  time_t is the number of seconds since the epoch.  They are unrelated.  I don't see why the width of time_t should depend on the width of the high precision timer.  Seems like a unnecessary, undesirable coupling.




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