Subversion Repositories Kolibri OS

Rev

Rev 9811 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #ifndef _TIME_H_
  2. #define _TIME_H_
  3.  
  4. #include <sys/ksys.h>
  5.  
  6. typedef unsigned long int clock_t;
  7. typedef unsigned long int time_t;
  8. #define clock()        _ksys_get_clock()
  9. #define CLOCKS_PER_SEC 100
  10.  
  11. #pragma pack(push, 1)
  12. struct tm {
  13.     int tm_sec;   /* seconds after the minute   0-61*/
  14.     int tm_min;   /* minutes after the hour     0-59 */
  15.     int tm_hour;  /* hours since midnight       0-23 */
  16.     int tm_mday;  /* day of the month   1-31 */
  17.     int tm_mon;   /* months since January       0-11 */
  18.     int tm_year;  /* years since 1900 */
  19.     int tm_wday;  /* days since Sunday  0-6             */
  20.     int tm_yday;  /* days since January 1       0-365   */
  21.     int tm_isdst; /* Daylight Saving Time flag  */
  22. };
  23. #pragma pack(pop)
  24.  
  25. DLLAPI time_t mktime(struct tm* timeptr);
  26. DLLAPI time_t time(time_t* timer);
  27. DLLAPI struct tm* localtime(const time_t* timer);
  28. DLLAPI double difftime(time_t end, time_t beginning);
  29. DLLAPI char* asctime(const struct tm* tm);
  30.  
  31. #endif