1
0

mine.cpp 554 B

123456789101112131415161718192021
  1. #include "mine.h"
  2. #include "common_tool.h"
  3. #include"tool_time.h"
  4. #include "log.h"
  5. uint64_t mine_tool::get_down_time()
  6. {
  7. return tool_time::to_ms(m_attendance_start_time);
  8. }
  9. uint64_t mine_tool::get_work_time()
  10. {
  11. return tool_time::elapse_ms(m_attendance_start_time);
  12. }
  13. int32_t mine_tool::is_on_duty()
  14. {
  15. uint64_t dt=get_down_time();
  16. uint64_t mt=tool_time::morning_of_today_ms();
  17. // log_info("down_time_now :%s,%lu - %lu = %d",cid.c_str(),dt,mt,dt>mt?1:0);
  18. // return get_down_time()>tool_time::morning_of_today_ms()?1:0;
  19. return dt>mt?1:0;
  20. }