Loading...
Searching...
No Matches
nightsched.c File Reference

The night window, by containment rather than by edge. More...

#include "nightsched.h"

Macros

#define DAY_MINUTES   1440
 Minutes in a day, which is the only range any of these readings may sit in.

Functions

static bool is_reading (int minute)
 Whether a reading is a real minute of the day rather than a missing one.
bool clock_window_contains (int start, int end, int now)
 Whether now falls inside a window that may run past midnight.
bool night_schedule_active (int mode, int now, int rise, int set, int fixed_start, int fixed_end, bool have_night)
 Whether the night window is open, whichever way the schedule is set.

Detailed Description

The night window, by containment rather than by edge.