?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef TIME_H
  2. #define TIME_H
  3.  
  4. #ifndef __TIME_UNSIGNED
  5. #define __TIME_UNSIGNED 1
  6. #endif
  7.  
  8. #if __TIME_UNSIGNED
  9. struct tm
  10. {
  11.   unsigned char tm_sec;                   /* Seconds.     [0-60]      */
  12.   unsigned char tm_min;                   /* Minutes.     [0-59]      */
  13.   unsigned char tm_hour;                  /* Hours.       [0-23]      */
  14.   unsigned char tm_mday;                  /* Day.         [1-31]      */
  15.   unsigned char tm_mon;                   /* Month.       [0-11]      */
  16.   int tm_year;                            /* Year since 1900          */
  17.   unsigned char tm_wday;                  /* Day of week. [0-6]       */
  18.   int tm_yday;                            /* Days in year.[0-365]     */
  19.   unsigned char tm_isdst;                 /* Daylight saving time     */
  20.   unsigned char tm_hundredth;             /* not standard 1/100th sec */
  21. };
  22. #else
  23. struct tm
  24. {
  25.   int tm_sec;                   /* Seconds.     [0-60]  */
  26.   int tm_min;                   /* Minutes.     [0-59]  */
  27.   int tm_hour;                  /* Hours.       [0-23]  */
  28.   int tm_mday;                  /* Day.         [1-31]  */
  29.   int tm_mon;                   /* Month.       [0-11]  */
  30.   int tm_year;                  /* Year since 1900      */
  31.   int tm_wday;                  /* Day of week. [0-6]   */
  32.   int tm_yday;                  /* Days in year.[0-365] */
  33.   int tm_isdst;                 /* Daylight saving time */
  34.   char *tm_zone;                /* Abbreviated timezone */
  35. };
  36. #endif
  37.  
  38. typedef unsigned long time_t;
  39.  
  40. time_t time(time_t *t);
  41. struct tm *gmtime(time_t *timep);
  42. struct tm *localtime(time_t *timep);
  43. time_t mktime(struct tm *timeptr);
  44. char *asctime(struct tm *timeptr);
  45. char *ctime(time_t *timep);
  46.  
  47. #endif /* TIME_H */
  48.