source: rtems/cpukit/posix/src/time.c @ 9b754a25

Last change on this file since 9b754a25 was 9b754a25, checked in by Joel Sherrill <joel.sherrill@…>, on 03/26/07 at 22:56:34

2007-03-26 Joel Sherrill <joel@…>

PR 1231/cpukit

  • posix/src/adasupp.c, posix/src/clockgetcpuclockid.c, posix/src/clockgetenableattr.c, posix/src/clockgetres.c, posix/src/clockgettime.c, posix/src/clocksetenableattr.c, posix/src/mutex.c, posix/src/mutexattrdestroy.c, posix/src/mutexattrgetprioceiling.c, posix/src/mutexattrgetprotocol.c, posix/src/mutexattrgetpshared.c, posix/src/mutexattrinit.c, posix/src/mutexattrsetprioceiling.c, posix/src/mutexattrsetprotocol.c, posix/src/mutexattrsetpshared.c, posix/src/mutexdefaultattributes.c, posix/src/mutexdestroy.c, posix/src/mutexgetprioceiling.c, posix/src/mutexlock.c, posix/src/mutexlocksupp.c, posix/src/mutexmp.c, posix/src/mutexsetprioceiling.c, posix/src/mutextimedlock.c, posix/src/mutextrylock.c, posix/src/mutexunlock.c, posix/src/nanosleep.c, posix/src/posixintervaltotimespec.c, posix/src/posixtimespecsubtract.c, posix/src/posixtimespectointerval.c, posix/src/psignalclearprocesssignals.c, posix/src/psignalclearsignals.c, posix/src/psignalsetprocesssignals.c, posix/src/psignalunblockthread.c, posix/src/ptimer.c, posix/src/ptimer1.c, posix/src/sched.c, posix/src/time.c: Remove unneeded includes of assert.h
  • Property mode set to 100644
File size: 864 bytes
Line 
1/*
2 *  $Id$
3 */
4
5#if HAVE_CONFIG_H
6#include "config.h"
7#endif
8
9#include <time.h>
10#include <errno.h>
11
12#include <rtems/system.h>
13#include <rtems/score/isr.h>
14#include <rtems/score/thread.h>
15#include <rtems/score/tod.h>
16
17#include <rtems/seterr.h>
18#include <rtems/posix/time.h>
19
20/*PAGE
21 *
22 *  4.5.1 Get System Time, P1003.1b-1993, p. 91
23 */
24
25/* Using the implementation in newlib */
26#if 0
27time_t time(
28  time_t   *tloc
29)
30{
31  time_t  seconds_since_epoch;
32
33  /*
34   *  No error is the time of day is not set.   For RTEMS the system time
35   *  starts out at the rtems epoch.
36   */
37
38  /*
39   *  Internally the RTEMS epoch is 1988.  This must be taken into account.
40   */
41
42  seconds_since_epoch = _TOD_Seconds_since_epoch;
43
44  seconds_since_epoch += POSIX_TIME_SECONDS_1970_THROUGH_1988;
45
46  if ( tloc )
47    *tloc = seconds_since_epoch;
48
49  return seconds_since_epoch;
50}
51#endif
Note: See TracBrowser for help on using the repository browser.