added constant for seconds between posix epoch (1970) and rtems epoch (1988).

Formerly this constant was in the file src/time.c.
This commit is contained in:
Joel Sherrill
1996-06-03 16:29:35 +00:00
parent f6e6ed8464
commit a38283590c
3 changed files with 33 additions and 0 deletions

View File

@@ -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
);

View File

@@ -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
);

View File

@@ -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
);