Sebastian Huber commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1484#note_159809 The `uint64_t Watchdog_Control::expire` member represents a time point for all three clocks: ticks, CLOCK_REALTIME, CLOCK_MONOTONIC. The POSIX clocks use 34 bits for the seconds part and 30 bits for the nanoseconds: ```c /** * @brief The maximum watchdog ticks value for the far future. */ #define WATCHDOG_MAXIMUM_TICKS UINT64_MAX #define WATCHDOG_NANOSECONDS_PER_SECOND 1000000000 /** * @brief The bits necessary to store 1000000000 * (= WATCHDOG_NANOSECONDS_PER_SECOND) nanoseconds. * * The expiration time is an unsigned 64-bit integer. To store nanoseconds * timeouts we use 30 bits (2**30 == 1073741824) for the nanoseconds and 34 * bits for the seconds since UNIX Epoch. This leads to a year 2514 problem. */ #define WATCHDOG_BITS_FOR_1E9_NANOSECONDS 30 /** * @brief The maximum number of seconds representable in the nanoseconds * watchdog format. * * We have 2**34 bits for the seconds part. */ #define WATCHDOG_MAX_SECONDS 0x3ffffffff ``` -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1484#note_159809 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-brrv1yrav0fv8em41ztbn66jx-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
