tool_time.h 492 B

1234567891011121314151617181920212223242526
  1. #ifndef AFUN_TIME_H
  2. #define AFUN_TIME_H
  3. #include "aFunToolExport.h"
  4. #if __cplusplus
  5. #include <ctime>
  6. #else
  7. #include "time.h"
  8. #endif
  9. /* 时间工具 */
  10. #ifndef AFUN_TOOL_C
  11. namespace aFuntool {
  12. #endif
  13. AFUN_TOOL_C_EXPORT_FUNC void safeSleep(double ms);
  14. AFUN_TOOL_C_EXPORT_FUNC char *getTime(time_t *t, const char *format);
  15. #ifdef __cplusplus
  16. AFUN_TOOL_EXPORT std::string getTime(time_t *t, const std::string &format);
  17. #endif
  18. #ifndef AFUN_TOOL_C
  19. }
  20. #endif
  21. #endif //AFUN_TIME_H