diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-06-03 16:29:35 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-06-03 16:29:35 +0000 |
commit | a38283590c8d4cb578378f61fab34038258eed38 (patch) | |
tree | f00d7b81a2dda1c41ebd6f4f18aaa1457d78f4e9 | |
parent | changed so this file is usable from assembly files. (diff) | |
download | rtems-a38283590c8d4cb578378f61fab34038258eed38.tar.bz2 |
added constant for seconds between posix epoch (1970) and rtems epoch (1988).
Formerly this constant was in the file src/time.c.
-rw-r--r-- | c/src/exec/posix/headers/time.h | 11 | ||||
-rw-r--r-- | c/src/exec/posix/include/rtems/posix/time.h | 11 | ||||
-rw-r--r-- | cpukit/posix/include/rtems/posix/time.h | 11 |
3 files changed, 33 insertions, 0 deletions
diff --git a/c/src/exec/posix/headers/time.h b/c/src/exec/posix/headers/time.h index 0b11f2fa54..eb48d2af5d 100644 --- a/c/src/exec/posix/headers/time.h +++ b/c/src/exec/posix/headers/time.h @@ -7,6 +7,17 @@ #ifndef __RTEMS_POSIX_TIME_h #define __RTEMS_POSIX_TIME_h +#include <rtems/score/tod.h> + +/* + * Seconds from January 1, 1970 to January 1, 1988. Used to account for + * differences between POSIX API and RTEMS core. + */ + +#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ + (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ + (4 * TOD_SECONDS_PER_DAY)) + Watchdog_Interval _POSIX_Time_Spec_to_interval( const struct timespec *time ); diff --git a/c/src/exec/posix/include/rtems/posix/time.h b/c/src/exec/posix/include/rtems/posix/time.h index 0b11f2fa54..eb48d2af5d 100644 --- a/c/src/exec/posix/include/rtems/posix/time.h +++ b/c/src/exec/posix/include/rtems/posix/time.h @@ -7,6 +7,17 @@ #ifndef __RTEMS_POSIX_TIME_h #define __RTEMS_POSIX_TIME_h +#include <rtems/score/tod.h> + +/* + * Seconds from January 1, 1970 to January 1, 1988. Used to account for + * differences between POSIX API and RTEMS core. + */ + +#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ + (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ + (4 * TOD_SECONDS_PER_DAY)) + Watchdog_Interval _POSIX_Time_Spec_to_interval( const struct timespec *time ); diff --git a/cpukit/posix/include/rtems/posix/time.h b/cpukit/posix/include/rtems/posix/time.h index 0b11f2fa54..eb48d2af5d 100644 --- a/cpukit/posix/include/rtems/posix/time.h +++ b/cpukit/posix/include/rtems/posix/time.h @@ -7,6 +7,17 @@ #ifndef __RTEMS_POSIX_TIME_h #define __RTEMS_POSIX_TIME_h +#include <rtems/score/tod.h> + +/* + * Seconds from January 1, 1970 to January 1, 1988. Used to account for + * differences between POSIX API and RTEMS core. + */ + +#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ + (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ + (4 * TOD_SECONDS_PER_DAY)) + Watchdog_Interval _POSIX_Time_Spec_to_interval( const struct timespec *time ); |