tod.h File Reference

#include <rtems/score/object.h>
#include <time.h>
#include <rtems/score/tod.inl>

Include dependency graph for tod.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define TOD_SECONDS_PER_MINUTE   (uint32_t)60
#define TOD_MINUTES_PER_HOUR   (uint32_t)60
#define TOD_MONTHS_PER_YEAR   (uint32_t)12
#define TOD_DAYS_PER_YEAR   (uint32_t)365
#define TOD_HOURS_PER_DAY   (uint32_t)24
#define TOD_SECONDS_PER_DAY
#define TOD_SECONDS_PER_NON_LEAP_YEAR   (365 * TOD_SECONDS_PER_DAY)
#define TOD_MILLISECONDS_PER_SECOND   (uint32_t)1000
#define TOD_MICROSECONDS_PER_SECOND   (uint32_t)1000000
#define TOD_NANOSECONDS_PER_SECOND   (uint32_t)1000000000
#define TOD_NANOSECONDS_PER_MICROSECOND   (uint32_t)1000
#define TOD_SECONDS_1970_THROUGH_1988
#define TOD_TICKS_PER_SECOND   (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick)
 Ticks per Second.
#define TOD_BASE_YEAR   1988
 RTEMS Epoch Year.
#define _TOD_Seconds_since_epoch   (_TOD_Now.tv_sec)
 Seconds Since RTEMS Epoch The following contains the number of seconds from 00:00:00 January 1, TOD_BASE_YEAR until the current time of day.
#define TOD_MILLISECONDS_TO_MICROSECONDS(_ms)   ((uint32_t)(_ms) * 1000L)
 TOD_MILLISECONDS_TO_MICROSECONDS.
#define TOD_MICROSECONDS_TO_TICKS(_us)   ((_us) / _TOD_Microseconds_per_tick)
 TOD_MICROSECONDS_TO_TICKS.
#define TOD_MILLISECONDS_TO_TICKS(_ms)   (TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / _TOD_Microseconds_per_tick)
 TOD_MILLISECONDS_TO_TICKS.
#define TOD_TICKS_PER_SECOND   (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick)
 Ticks per Second.

Functions

void _TOD_Handler_initialization (uint32_t microseconds_per_tick)
 _TOD_Handler_initialization
void _TOD_Set (const struct timespec *time)
 _TOD_Set
void _TOD_Get (struct timespec *time)
 _TOD_Get
void _TOD_Get_uptime (struct timespec *time)
 _TOD_Get_uptime
void _TOD_Tickle_ticks (void)

Variables

SCORE_EXTERN boolean _TOD_Is_set
 Is the Time Of Day Set.
SCORE_EXTERN struct timespec _TOD_Now
 Current Time of Day (Timespec) The following contains the current time of day.
SCORE_EXTERN struct timespec _TOD_Uptime
 Current Time of Day (Timespec) The following contains the running uptime.
SCORE_EXTERN uint32_t _TOD_Microseconds_per_tick
 Microseconds per Clock Tick.


Detailed Description

This include file contains all the constants and structures associated with the Time of Day Handler.

Define Documentation

#define TOD_BASE_YEAR   1988

RTEMS Epoch Year.

The following constant define the earliest year to which an time of day can be initialized. This is considered the epoch.

#define TOD_SECONDS_1970_THROUGH_1988

Value:

(((1987 - 1970 + 1)  * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
  (4 * TOD_SECONDS_PER_DAY))
Seconds from January 1, 1970 to January 1, 1988. Used to account for differences between POSIX API and RTEMS core. The timespec format time is kept in POSIX compliant form.


Generated on Fri Jul 4 12:16:42 2008 for RTEMSSuperCore by  doxygen 1.5.6