summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 16:29:35 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 16:29:35 +0000
commita38283590c8d4cb578378f61fab34038258eed38 (patch)
treef00d7b81a2dda1c41ebd6f4f18aaa1457d78f4e9 /cpukit/posix/include/rtems
parentchanged so this file is usable from assembly files. (diff)
downloadrtems-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.
Diffstat (limited to 'cpukit/posix/include/rtems')
-rw-r--r--cpukit/posix/include/rtems/posix/time.h11
1 files changed, 11 insertions, 0 deletions
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
);