RTEMS CPU Kit with SuperCore
4.11.2
|
The following constants are related to the time of day and are independent of RTEMS. More...
![]() |
Files | |
file | tod.h |
Time of Day Handler API. | |
file | todimpl.h |
Time of Day Handler API. | |
file | coretod.c |
Initializes the Time of Day Handler. | |
file | coretodadjust.c |
Adjust the Time of Time. | |
file | coretodset.c |
Set Time of Day Given a Timestamp. | |
file | coretodtickle.c |
Increments time of day at each clock tick. | |
file | coretodtickspersec.c |
Convert Ticks To Seconds. | |
Data Structures | |
struct | TOD_Control |
TOD control. More... | |
Macros | |
#define | TOD_SECONDS_PER_MINUTE (uint32_t)60 |
This constant represents the number of seconds in a minute. | |
#define | TOD_MINUTES_PER_HOUR (uint32_t)60 |
This constant represents the number of minutes per hour. | |
#define | TOD_MONTHS_PER_YEAR (uint32_t)12 |
This constant represents the number of months in a year. | |
#define | TOD_DAYS_PER_YEAR (uint32_t)365 |
This constant represents the number of days in a non-leap year. | |
#define | TOD_HOURS_PER_DAY (uint32_t)24 |
This constant represents the number of hours per day. | |
#define | TOD_SECONDS_PER_DAY |
This constant represents the number of seconds in a day which does not include a leap second. More... | |
#define | TOD_SECONDS_PER_NON_LEAP_YEAR (365 * TOD_SECONDS_PER_DAY) |
This constant represents the number of seconds in a non-leap year. | |
#define | TOD_MILLISECONDS_PER_SECOND (uint32_t)1000 |
This constant represents the number of millisecond in a second. | |
#define | TOD_MICROSECONDS_PER_SECOND (uint32_t)1000000 |
This constant represents the number of microseconds in a second. | |
#define | TOD_NANOSECONDS_PER_SECOND (uint32_t)1000000000 |
This constant represents the number of nanoseconds in a second. | |
#define | TOD_NANOSECONDS_PER_MICROSECOND (uint32_t)1000 |
This constant represents the number of nanoseconds in a mircosecond. | |
#define | TOD_TICKS_PER_SECOND TOD_TICKS_PER_SECOND_method() |
Gets number of ticks in a second. More... | |
Functions | |
void | _TOD_Handler_initialization (void) |
Initializes the time of day handler. More... | |
void | _TOD_Set_with_timestamp (const Timestamp_Control *tod_as_timestamp) |
Sets the time of day from timestamp. More... | |
void | _TOD_Tickle_ticks (void) |
Increments time of day at each clock tick. More... | |
uint32_t | TOD_TICKS_PER_SECOND_method (void) |
Gets number of ticks in a second. More... | |
RTEMS_INLINE_ROUTINE void | _TOD_Get_timeval (struct timeval *time) |
This routine returns a timeval based upon the internal timespec format TOD. | |
void | _TOD_Adjust (const Timestamp_Control timestamp) |
Adjust the Time of Time. More... | |
RTEMS_INLINE_ROUTINE bool | _TOD_Is_set (void) |
Check if the TOD is Set. More... | |
Variables | |
SCORE_EXTERN TOD_Control | _TOD |
The following constants are related to the time of day and are independent of RTEMS.
This handler encapsulates functionality used to manage time of day.
#define TOD_SECONDS_PER_DAY |
This constant represents the number of seconds in a day which does not include a leap second.
#define TOD_TICKS_PER_SECOND TOD_TICKS_PER_SECOND_method() |
Gets number of ticks in a second.
This method exists to hide the fact that TOD_TICKS_PER_SECOND can not be implemented as a macro in a .h file due to visibility issues. The Configuration Table is not available to SuperCore .h files but is available to their .c files.
Referenced by _Timespec_To_ticks().
void _TOD_Adjust | ( | const Timestamp_Control | timestamp | ) |
Adjust the Time of Time.
This method is used to adjust the current time of day by the specified amount.
[in] | delta | is the amount to adjust |
References _Thread_Disable_dispatch().
Referenced by _TOD_Get_timeval(), and adjtime().
void _TOD_Handler_initialization | ( | void | ) |
Initializes the time of day handler.
Performs the initialization necessary for the Time Of Day handler.
RTEMS_INLINE_ROUTINE bool _TOD_Is_set | ( | void | ) |
Check if the TOD is Set.
Referenced by rtems_clock_get_seconds_since_epoch(), rtems_clock_get_tod(), rtems_clock_get_tod_timeval(), rtems_task_wake_when(), rtems_timer_fire_when(), and rtems_timer_server_fire_when().
void _TOD_Set_with_timestamp | ( | const Timestamp_Control * | tod_as_timestamp | ) |
Sets the time of day from timestamp.
The tod_as_timestamp timestamp represents the time since UNIX epoch. The watchdog seconds chain will be adjusted.
[in] | tod_as_timestamp | is the constant of the time of day as a timestamp |
References _Thread_Disable_dispatch(), and _Timestamp_To_timespec().
void _TOD_Tickle_ticks | ( | void | ) |
Increments time of day at each clock tick.
This routine increments the ticks field of the current time of day at each clock tick.
References _Watchdog_Ticks_since_boot.
Referenced by _Watchdog_Tick().
uint32_t TOD_TICKS_PER_SECOND_method | ( | void | ) |
Gets number of ticks in a second.
This method returns the number of ticks in a second.
References TOD_MICROSECONDS_PER_SECOND.