summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:16:57 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:16:57 -0500
commit96152ffff82827c24bab64ce513c19df7383d75c (patch)
tree4d2d361ecd6dcf8608d24f7f12a44853e37474d5 /instr-daemon.c
parent209deac675a4faf789b8f72de04832e4ec53f9d0 (diff)
better min/max startup delays
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index a4265cf..4d65a54 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -240,9 +240,15 @@ int main(int argc, char **argv)
long timer_count;
long on_delay = (long)globals.Flash.turn_on_dly;
- if ((on_delay < 1) || (on_delay > 120)) {
- on_delay = 1;
+#define MIN_STARTUP_DELAY 2
+#define MAX_STARTUP_DELAY 120
+
+ if (on_delay < MIN_STARTUP_DELAY) {
+ on_delay = MIN_STARTUP_DELAY;
}
+ if (on_delay > MAX_STARTUP_DELAY) {
+ on_delay = MAX_STARTUP_DELAY;
+ }
while ((timer_count=sec_timer()-globals.Timers.startup_timer_value) < on_delay) {
message = g_strdup_printf ("%ld ", on_delay - timer_count);