Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifndef _TIME_H_
  2. #define _TIME_H_
  3.  
  4. #include <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. struct tm {
  12.         int tm_sec;      /*     seconds after the minute        0-61*/
  13.         int tm_min;      /* minutes after the hour      0-59 */
  14.         int tm_hour; /* hours since midnight    0-23 */
  15.         int tm_mday; /* day of the month        1-31 */
  16.         int tm_mon;      /* months since January        0-11 */
  17.         int tm_year; /* years since 1900 */    
  18.         int tm_wday; /* days since Sunday       0-6             */
  19.         int tm_yday; /* days since January 1    0-365   */
  20.         int tm_isdst; /* Daylight Saving Time flag      */
  21. };
  22.  
  23. extern time_t _FUNC(mktime)(struct tm * timeptr);
  24. extern time_t _FUNC(time)(time_t* timer);
  25. extern struct tm * _FUNC(localtime)(const time_t * timer); /* non-standard!  ignore parameter and return just time now, not generate tm_isdst, tm_yday, tm_wday == -1  */
  26. extern double _FUNC(difftime)(time_t end, time_t beginning);
  27.  
  28. extern struct tm buffertime;
  29.  
  30. #endif