diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2016-12-19 06:04:51 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2016-12-19 06:04:51 +0300 |
commit | 758762fbc91f2002a9e41957ca34a5d772d575f4 (patch) | |
tree | 0bc6698fe63d0b081b3e83fd711e22e5902adeaa /plugins/Alarms/src/alarmlist.h | |
parent | 83175855d796e139c67d145e710336ec44660319 (diff) |
plugins:
alarms:
added days of week.
closes #318
Diffstat (limited to 'plugins/Alarms/src/alarmlist.h')
-rwxr-xr-x[-rw-r--r--] | plugins/Alarms/src/alarmlist.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Alarms/src/alarmlist.h b/plugins/Alarms/src/alarmlist.h index af8e90b666..a18b8a4aa1 100644..100755 --- a/plugins/Alarms/src/alarmlist.h +++ b/plugins/Alarms/src/alarmlist.h @@ -11,11 +11,11 @@ void free_alarm_data(ALARM *alarm); void copy_alarm_data(ALARM *dest, ALARM *src);
-int MinutesInFuture(SYSTEMTIME time, Occurrence occ);
+int MinutesInFuture(SYSTEMTIME time, Occurrence occ, int selected_days = 0);
void TimeForMinutesInFuture(int mins, SYSTEMTIME *time);
static bool operator<(const ALARM &a1, const ALARM &a2) {
- return MinutesInFuture(a1.time, a1.occurrence) < MinutesInFuture(a2.time, a2.occurrence); // less-than inverted 'cause we want ascending order
+ return MinutesInFuture(a1.time, a1.occurrence, a1.day_mask) < MinutesInFuture(a2.time, a2.occurrence, a2.day_mask); // less-than inverted 'cause we want ascending order
}
class AlarmList {
@@ -138,7 +138,7 @@ void suspend(unsigned short alarm_id); void GetPluginTime(SYSTEMTIME *t);
// increase 'time' to next occurrence
-bool UpdateAlarm(SYSTEMTIME &time, Occurrence occ);
+bool UpdateAlarm(SYSTEMTIME &time, Occurrence occ, int selected_days = 0);
const ULARGE_INTEGER mult = { 600000000, 0}; // number of 100 microsecond blocks in a minute
|