htime.h 523 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef HW_TIME_H_
  2. #define HW_TIME_H_
  3. #include <time.h>
  4. #include "hdef.h"
  5. #include "hplatform.h"
  6. typedef struct datetime_s {
  7. int year;
  8. int month;
  9. int day;
  10. int hour;
  11. int min;
  12. int sec;
  13. int ms;
  14. } datetime_t;
  15. void msleep(unsigned long ms);
  16. #ifdef _WIN32
  17. inline void sleep(unsigned int s) {
  18. Sleep(s*1000);
  19. }
  20. #endif
  21. uint64 gettick();
  22. int month_atoi(const char* month);
  23. const char* month_itoa(int month);
  24. datetime_t get_datetime();
  25. datetime_t get_compile_datetime();
  26. #endif // HW_TIME_H_