home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / unixtools / unixlib / clib / h / time < prev   
Encoding:
Text File  |  1992-07-21  |  1.1 KB  |  42 lines

  1. /* time.h (c) Copyright 1990 H.Rogers */
  2.  
  3. #ifndef __TIME_H
  4. #define __TIME_H
  5.  
  6. #ifndef __SYS_TYPES_H
  7. #include "sys/types.h"
  8. #endif
  9.  
  10. #define CLK_TCK     100
  11. #define CLOCKS_PER_SEC    100
  12.  
  13. extern    clock_t     clock(void);
  14. extern    time_t        time(time_t *);
  15.  
  16. struct tm
  17.   {
  18.   int        tm_sec;     /* seconds (0 - 59) */
  19.   int        tm_min;     /* minutes (0 - 59) */
  20.   int        tm_hour;    /* hours (0 - 23) */
  21.   int        tm_mday;    /* day of month (1 - 31) */
  22.   int        tm_mon;     /* month of year (0 - 11) */
  23.   int        tm_year;    /* year - 1900 */
  24.   int        tm_wday;    /* day of week (Sunday = 0) */
  25.   int        tm_yday;    /* day of year (0 - 365) */
  26.   int        tm_isdst;    /* 1 - DST in effect,0 - not,-1 - not known */
  27.   time_t    tm_gmtoff;    /* offset west from GMT in seconds */
  28.   char        tm_zone[4];    /* abbreviation of timezone name */
  29.   };
  30.  
  31. extern    char        *asctime(const struct tm *);
  32. extern    char        *ctime(const time_t *);
  33. extern    double        difftime(time_t,time_t);
  34. extern    struct tm    *gmtime(const time_t *);
  35. extern    struct tm    *localtime(const time_t *);
  36. extern    time_t        mktime(struct tm *);
  37. extern    size_t        strftime(char *,size_t,const char *,const struct tm *);
  38.  
  39. extern    void        tzset(void);
  40.  
  41. #endif
  42.