Search in sources :

Example 1 with Timeframe

use of de.avanux.smartapplianceenabler.schedule.Timeframe in project SmartApplianceEnabler by camueller.

the class RunningTimeMonitor method activateTimeframeInterval.

public void activateTimeframeInterval(LocalDateTime now, Integer runtime) {
    activeTimeframeInterval = null;
    Schedule schedule = new Schedule(runtime, null, new TimeOfDay(now), new TimeOfDay(now));
    Interval interval = new Interval(now.toDateTime(), now.plusSeconds(runtime).toDateTime());
    Timeframe timeframe = schedule.getTimeframe();
    activateTimeframeInterval(now, new TimeframeInterval(timeframe, interval));
}
Also used : TimeOfDay(de.avanux.smartapplianceenabler.schedule.TimeOfDay) TimeframeInterval(de.avanux.smartapplianceenabler.schedule.TimeframeInterval) Timeframe(de.avanux.smartapplianceenabler.schedule.Timeframe) Schedule(de.avanux.smartapplianceenabler.schedule.Schedule) Interval(org.joda.time.Interval) TimeframeInterval(de.avanux.smartapplianceenabler.schedule.TimeframeInterval)

Aggregations

Schedule (de.avanux.smartapplianceenabler.schedule.Schedule)1 TimeOfDay (de.avanux.smartapplianceenabler.schedule.TimeOfDay)1 Timeframe (de.avanux.smartapplianceenabler.schedule.Timeframe)1 TimeframeInterval (de.avanux.smartapplianceenabler.schedule.TimeframeInterval)1 Interval (org.joda.time.Interval)1