home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / unix / unixlib_1 / !UnixLib37_src_clib_h_time < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-09  |  1.9 KB  |  79 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/clib/h/RCS/time,v $
  4.  * $Date: 1996/10/30 21:58:58 $
  5.  * $Revision: 1.2 $
  6.  * $State: Rel $
  7.  * $Author: unixlib $
  8.  *
  9.  * $Log: time,v $
  10.  * Revision 1.2  1996/10/30 21:58:58  unixlib
  11.  * Massive changes made by Nick Burret and Peter Burwood.
  12.  *
  13.  * Revision 1.1  1996/04/19 21:02:57  simon
  14.  * Initial revision
  15.  *
  16.  ***************************************************************************/
  17.  
  18. /* ANSI Standard 4.12: Date and Time <time.h>.  */
  19.  
  20. #ifndef __TIME_H
  21. #define __TIME_H
  22.  
  23. #ifndef __STDDEF_H
  24. #include <stddef.h>
  25. #endif
  26. #ifndef __UNIXLIB_TYPES_H
  27. #include <unixlib/types.h>
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #define CLK_TCK     100
  35. #define CLOCKS_PER_SEC    100
  36.  
  37. typedef long int clock_t;
  38. typedef __time_t time_t;
  39.  
  40. extern    clock_t     clock(void);
  41. extern    time_t        time(time_t *);
  42.  
  43. struct tm
  44.   {
  45.   int        tm_sec;     /* seconds (0 - 59) */
  46.   int        tm_min;     /* minutes (0 - 59) */
  47.   int        tm_hour;    /* hours (0 - 23) */
  48.   int        tm_mday;    /* day of month (1 - 31) */
  49.   int        tm_mon;     /* month of year (0 - 11) */
  50.   int        tm_year;    /* year - 1900 */
  51.   int        tm_wday;    /* day of week (Sunday = 0) */
  52.   int        tm_yday;    /* day of year (0 - 365) */
  53.   int        tm_isdst;    /* 1 - DST in effect,0 - not,-1 - not known */
  54.   int        tm_gmtoff;    /* offset west from GMT in seconds */
  55.   char        tm_zone[4];    /* abbreviation of timezone name */
  56.   };
  57.  
  58. extern    char        *asctime(const struct tm *);
  59. extern    char        *ctime(const time_t *);
  60. extern    double        difftime(time_t,time_t);
  61. extern    struct tm    *gmtime(const time_t *);
  62. extern    struct tm    *localtime(const time_t *);
  63. extern    time_t        mktime(struct tm *);
  64. extern    size_t        strftime(char *,size_t,const char *,const struct tm *);
  65.  
  66.  
  67. extern    int            timezone;    /* same as tm_gmtoff above */
  68. extern  struct tm    __tz[1];
  69.  
  70. /* POSIX extensions.  */
  71. extern    void        tzset(void);
  72.  
  73.  
  74. #ifdef __cplusplus
  75.     }
  76. #endif
  77.  
  78. #endif
  79.