MCPcopy Create free account
hub / github.com/apache/kvrocks / IsMatch

Method IsMatch

src/common/cron.cc:35–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35bool CronScheduler::IsMatch(const tm *tm) const {
36 bool minute_match = minute.IsMatch(tm->tm_min);
37 bool hour_match = hour.IsMatch(tm->tm_hour);
38 bool mday_match = mday.IsMatch(tm->tm_mday, 1);
39 bool month_match = month.IsMatch(tm->tm_mon + 1, 1);
40 bool wday_match = wday.IsMatch(tm->tm_wday);
41
42 return minute_match && hour_match && mday_match && month_match && wday_match;
43}
44
45StatusOr<CronScheduler> CronScheduler::Parse(std::string_view minute, std::string_view hour, std::string_view mday,
46 std::string_view month, std::string_view wday) {

Callers 1

IsTimeMatchMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected