cederom opened a new issue, #18849:
URL: https://github.com/apache/nuttx/issues/18849

   ### Is your feature request related to a problem? Please describe.
   
   * We are moving to POSIX compliant time representation (The Open Group Base 
Specifications Issue 8 IEEE Std 1003.1-2024 [1][2][3]) with `uint64_t`.
   * POSIX `sys/types.h` [3] defines:
     > `time_t` as "Used for time in seconds"
     > `time_t` shall be an integer type with a width (see <stdint.h>) of at 
least 64 bits. 
   * What it solves:
     * year 2038 problem.
     * 32-bit system clock wrapped in ~497 days and almost every active board 
already enabled it.
     * runtime time overflow calculation errors after some weeks.
   * What it breaks:
     * 8/16/32-bit platforms are most likely impacted by increased code size 
(i.e. ~2KB) when `long long` type is not natively supported.
     * time calculation will be slower on older platforms.
     * non-atomic time access (needs some additional protection).
   
   This is a long standing challenge discussed on our mailing list [4][5].
   
   [1] https://pubs.opengroup.org/onlinepubs/9799919799/
   [2] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html
   [3] 
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_types.h.html
   [4] https://www.mail-archive.com/[email protected]/msg12060.html
   [5] https://www.mail-archive.com/[email protected]/msg14534.html
   
   ### Describe the solution you'd like
   
   1. We are moving towards POSIX standard compliant time representation with 
`int64_t` type as "default".
   2. We need alternative "portable" implementation of the time representation 
on platforms that do not support native `int64_t` type that will solve size 
increase, slow down, and non-atomic time access protections.
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Verification
   
   - [x] I have verified before submitting the report.


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

Reply via email to