home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROS_m68k_bin.lha / AROS / include / time.h < prev    next >
C/C++ Source or Header  |  1997-02-08  |  1KB  |  67 lines

  1. #ifndef _TIME_H
  2. #define _TIME_H
  3.  
  4. /*
  5.     (C) 1995-96 AROS - The Amiga Replacement OS
  6.     $Id: time.h,v 1.1 1997/01/29 16:51:36 digulla Exp $
  7.  
  8.     Desc: ANSI-C header file time.h
  9.     Lang: english
  10. */
  11.  
  12. #ifndef __typedef_time_t
  13. #   define __typedef_time_t
  14.     typedef long time_t;
  15. #endif
  16.  
  17. #ifndef __typedef_clock_t
  18. #   define __typedef_clock_t
  19.     typedef long clock_t;
  20. #endif
  21.  
  22. #if !defined(_SIZE_T) && !defined(__typedef_size_t)
  23. #   define __typedef_size_t
  24. #   define _SIZE_T
  25.     /* Must be int and not long. Otherwise gcc will complain */
  26.     typedef unsigned int size_t;
  27. #endif
  28.  
  29. #ifndef NULL
  30. #   ifdef __cplusplus
  31. #    define NULL    0
  32. #   else
  33. #    define NULL    ((void *) 0)
  34. #   endif
  35. #endif
  36.  
  37. struct tm
  38. {
  39.     int tm_sec;
  40.     int tm_min;
  41.     int tm_hour;
  42.     int tm_mday;
  43.     int tm_mon;
  44.     int tm_year;
  45.     int tm_wday;
  46.     int tm_yday;
  47.     int tm_isdst;
  48. };
  49.  
  50. extern clock_t clock (void);
  51. extern time_t  time (time_t * tp);
  52. extern double  difftime (time_t time2, time_t time1);
  53. extern time_t  mktime (struct tm * tp);
  54.  
  55. extern char * asctime (const struct tm * tp);
  56. extern char * ctime (const time_t * tp);
  57. extern size_t strftime (char * s, size_t smax,
  58.             const char * fmt, const struct tm * tp);
  59. extern char * strptime (char * s, const char * fmt, struct tm * tm);
  60.  
  61. extern void tzset (void);
  62.  
  63. extern struct tm * gmtime    (const time_t * tp);
  64. extern struct tm * localtime (const time_t * tp);
  65.  
  66. #endif /* _TIME_H */
  67.