summaryrefslogtreecommitdiff
path: root/sched.h
diff options
context:
space:
mode:
authorMichael Meskes <meskes@debian.org>2008-08-27 13:45:17 +0200
committerMichael Meskes <meskes@debian.org>2008-08-27 13:45:17 +0200
commitf06a98f0b468601fc1ab929b06a7962cca8614ea (patch)
treed1e64a0785f80b753f11d81a77f9cb27f86dcf0a /sched.h
Imported Upstream version 0.1
Diffstat (limited to 'sched.h')
-rw-r--r--sched.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/sched.h b/sched.h
new file mode 100644
index 0000000..ceae3ed
--- /dev/null
+++ b/sched.h
@@ -0,0 +1,21 @@
+#define SCHED_BATT 0 /* batteries */
+#define SCHED_ACSTATE 1 /* ac state */
+#define SCHED_ZONE 2 /* zones */
+#define SCHED_FAN 3 /* fans */
+
+#define N_SCHED 4
+
+/* Default Interval */
+#define DI_ACSTATE 300
+#define DI_BATT 15
+#define DI_ZONE 5
+#define DI_FAN 5
+
+typedef struct
+{
+ int what;
+ time_t last_run;
+ int interval;
+} sched_t;
+
+void sleep_untill_next_event(sched_t *psched, int n_sched);