MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / ShouldTrigger

Method ShouldTrigger

plugins/schedule/macro-schedule.cpp:261–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261bool MacroScheduleEntry::ShouldTrigger(const QDateTime &now) const
262{
263 if (!enabled) {
264 return false;
265 }
266 if (IsExpired()) {
267 return false;
268 }
269 if (!startDateTime.isValid()) {
270 return false;
271 }
272 const QDateTime next = NextTriggerTime();
273 if (!next.isValid()) {
274 return false;
275 }
276 return next <= now;
277}
278
279void MacroScheduleEntry::MarkTriggered(const QDateTime &now)
280{

Callers 1

checkAndFireEntriesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected