18 #ifndef _RTEMS_SCORE_TODIMPL_H 19 #define _RTEMS_SCORE_TODIMPL_H 45 #define TOD_SECONDS_PER_MINUTE (uint32_t)60 50 #define TOD_MINUTES_PER_HOUR (uint32_t)60 55 #define TOD_MONTHS_PER_YEAR (uint32_t)12 60 #define TOD_DAYS_PER_YEAR (uint32_t)365 65 #define TOD_HOURS_PER_DAY (uint32_t)24 71 #define TOD_SECONDS_PER_DAY (uint32_t) (TOD_SECONDS_PER_MINUTE * \ 72 TOD_MINUTES_PER_HOUR * \ 78 #define TOD_SECONDS_PER_NON_LEAP_YEAR (365 * TOD_SECONDS_PER_DAY) 83 #define TOD_MILLISECONDS_PER_SECOND (uint32_t)1000 88 #define TOD_MICROSECONDS_PER_SECOND (uint32_t)1000000 93 #define TOD_NANOSECONDS_PER_SECOND (uint32_t)1000000000 98 #define TOD_NANOSECONDS_PER_MICROSECOND (uint32_t)1000 107 #define TOD_SECONDS_1970_THROUGH_1988 \ 108 (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ 109 (4 * TOD_SECONDS_PER_DAY)) 118 #define TOD_BASE_YEAR 1988 142 void _TOD_Lock(
void );
144 void _TOD_Unlock(
void );
146 #if defined(RTEMS_DEBUG) 147 bool _TOD_Is_owner(
void );
167 const struct timespec *tod,
176 static inline void _TOD_Get(
193 static inline void _TOD_Get_uptime(
208 static inline void _TOD_Get_zero_based_uptime(
222 static inline void _TOD_Get_zero_based_uptime_as_timespec(
223 struct timespec *time
236 static inline uint32_t _TOD_Seconds_since_epoch(
void )
259 #define TOD_TICKS_PER_SECOND TOD_TICKS_PER_SECOND_method() 281 const struct timespec *delta
TOD control.
Definition: todimpl.h:130
RTEMS_INLINE_ROUTINE void _TOD_Get_timeval(struct timeval *time)
Definition: todimpl.h:265
int64_t Timestamp_Control
Definition: timestamp.h:52
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:65
#define _Timecounter_Acquire(lock_context)
Lock to protect the timecounter mechanic.
Definition: timecounter.h:199
Helpers for Manipulating Timestamps.
int64_t _Timecounter_Sbinuptime(void)
Returns the uptime in the sbintime_t format.
bool is_set
Indicates if the time of day is set.
Definition: todimpl.h:137
RTEMS_INLINE_ROUTINE bool _TOD_Is_set(void)
Check if the TOD is Set.
Definition: todimpl.h:289
volatile time_t _Timecounter_Time_second
The wall clock time in seconds.
void _Timecounter_Nanouptime(struct timespec *ts)
Returns the uptime in the timespec format.
Timecounter Implementation.
void _Timecounter_Nanotime(struct timespec *ts)
Returns the wall clock time in the timespec format.
void _TOD_Adjust(const struct timespec *delta)
Adjust the Time of Time.
Definition: coretodadjust.c:23
Constants and Structures Associated with Watchdog Timers.
uint32_t TOD_TICKS_PER_SECOND_method(void)
Gets number of ticks in a second.
Definition: coretodtickspersec.c:24
void _Timecounter_Microtime(struct timeval *tv)
Returns the wall clock time in the timeval format.
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
void _TOD_Set(const struct timespec *tod, ISR_lock_Context *lock_context)
Sets the time of day.
Definition: coretodset.c:25