#include "mine.h" #include "common_tool.h" #include"tool_time.h" #include "log.h" uint64_t mine_tool::get_down_time() { return tool_time::to_ms(m_attendance_start_time); } uint64_t mine_tool::get_work_time() { return tool_time::elapse_ms(m_attendance_start_time); } int32_t mine_tool::is_on_duty() { uint64_t dt=get_down_time(); uint64_t mt=tool_time::morning_of_today_ms(); // log_info("down_time_now :%s,%lu - %lu = %d",cid.c_str(),dt,mt,dt>mt?1:0); // return get_down_time()>tool_time::morning_of_today_ms()?1:0; return dt>mt?1:0; }