21 typedef std::chrono::time_point<std::chrono::system_clock> t_time_pt;
22 typedef std::chrono::duration<unsigned long long> t_duration;
28 void init(
const std::string &path,
unsigned default_second_interval);
40 unsigned begin_time_hour;
41 unsigned begin_time_minute;
42 unsigned end_time_hour;
43 unsigned end_time_minute;
44 unsigned interval_between_frame_capture_seconds;
45 bool end_time_is_next_day;
54 static bool isInTimeRule(
const TimeRule &t,
const tm &now);
58 PARSE_RESULT_BAD_CHARS,
59 PARSE_RESULT_OUT_OF_BOUND,
63 static ParseResult stoi_err_handling(
unsigned& dst,
const std::string &src,
unsigned max_bound);
64 static bool parsing_contains_error(
const std::vector<ParseResult>& parse_res_list,
65 const std::vector<std::string>& str_list,
const std::string& curr_line,
66 unsigned line_number);
67 bool single_time_rule_parser(
const std::string &path,
const std::string &line,
68 unsigned line_number);
70 std::chrono::seconds default_duration_;
71 t_time_pt end_of_current_time_interval_;
72 t_duration current_time_interval_;
73 std::vector<TimeRule> rules_;