home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / ansi / time.h < prev   
Text File  |  1991-06-17  |  1KB  |  62 lines

  1. /*
  2.  * Copyright (c) 1983, 1987 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)time.h    1.2 (Berkeley) 3/4/87
  7.  */
  8.  
  9. /* Copyright (c) 1988 NeXT, Inc. - 9/8/88 CCH */
  10.  
  11. #ifndef _TIME_H
  12. #define _TIME_H
  13.  
  14. #ifndef __STRICT_BSD__
  15. #import <stddef.h>
  16.  
  17. #define CLK_TCKitypedef unsigned long int clock_t;
  18. #ifndef _TIME_T
  19. #define _TIME_T
  20. typedef long time_t;
  21. #endif /* _TIME_T */
  22.  
  23. #endif /* __STRICT_BSD__ */
  24.  
  25. /*
  26.  * Structure returned by gmtime and localtime calls (see ctime(3)).
  27.  */
  28. struct tm {
  29.     int    tm_sec;
  30.     int    tm_min;
  31.     int    tm_hour;
  32.     int    tm_mday;
  33.     int    tm_mon;
  34.     int    tm_year;
  35.     int    tm_wday;
  36.     int    tm_yday;
  37.     int    tm_isdst;
  38.     long    tm_gmtoff;
  39.     char    *tm_zone;
  40. };
  41.  
  42. #ifdef __STRICT_BSD__
  43. extern    struct tm *gmtime(), *localtime();
  44. extern    char *asctime(), *ctime();
  45. #else /* __STRICT_BSD__ */
  46. /* ANSI C functions */
  47. clock_t clock(void);
  48. double difftime(time_t time1, time_t time0);
  49. time_t mktime(struct tm *timeptr);
  50. size_t strftime(char *s, size_t maxsize,
  51.     const char *format, const struct tm *timeptr);
  52.  
  53. /* BSD and ANSI C functions */
  54. time_t time(time_t *timer);
  55. char *asctime(const struct tm *timeptr);
  56. char *ctime(const time_t *timer);
  57. struct tm *gmtime(const time_t *timer);
  58. struct tm *localtime(const time_t *timer);
  59. #endif /* __STRICT_BSD__ */
  60.  
  61. #endif /* _TIME_H */
  62.