source: rtems/c/src/exec/posix/src/time.c @ 9f95a19

4.104.114.84.95
Last change on this file since 9f95a19 was 9f95a19, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 2, 1999 at 6:35:52 PM

Split time.c into multiple files.

  • Property mode set to 100644
File size: 849 bytes
Line 
1/*
2 *  $Id$
3 */
4
5#include <assert.h>
6#include <time.h>
7#include <errno.h>
8
9#include <rtems/system.h>
10#include <rtems/score/isr.h>
11#include <rtems/score/thread.h>
12#include <rtems/score/tod.h>
13
14#include <rtems/posix/seterr.h>
15#include <rtems/posix/time.h>
16
17/*PAGE
18 *
19 *  4.5.1 Get System Time, P1003.1b-1993, p. 91
20 */
21
22/* Using the implementation in newlib */
23#if 0
24time_t time(
25  time_t   *tloc
26)
27{
28  time_t  seconds_since_epoch;
29
30  /*
31   *  No error is the time of day is not set.   For RTEMS the system time
32   *  starts out at the rtems epoch.
33   */
34
35  /*
36   *  Internally the RTEMS epoch is 1988.  This must be taken into account.
37   */
38
39  seconds_since_epoch = _TOD_Seconds_since_epoch;
40     
41  seconds_since_epoch += POSIX_TIME_SECONDS_1970_THROUGH_1988;
42
43  if ( tloc )
44    *tloc = seconds_since_epoch;
45
46  return seconds_since_epoch;
47}
48#endif
Note: See TracBrowser for help on using the repository browser.