diff options
-rw-r--r-- | input_gadgets.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/input_gadgets.c b/input_gadgets.c index 0a6b6df..a9bed30 100644 --- a/input_gadgets.c +++ b/input_gadgets.c @@ -251,7 +251,6 @@ void *gadgets_watch_current_temperature(void *param) memset(p->double_output, 0, sizeof(double)*2); while (p->keep_running) { if (((time(NULL) >= next_update) || (p->force_update)) && (!p->output_ready)) { - next_update = time(NULL) + 600; // 10 minutes ahead next_dns_query = time(NULL) + 30; // 1/2 minute ahead memset(p->text_output, 0, MAX_TEXT_OUTPUT_LEN); if (gadgets_retrieve_current_temperature( @@ -260,8 +259,10 @@ void *gadgets_watch_current_temperature(void *param) &p->double_output[0], &p->double_output[1] )) { + next_update = time(NULL) + 600; // 10 minutes ahead p->last_update = time(NULL); } else { + next_update = time(NULL) + 30; // 1/2 minute ahead fprintf(stderr, "gadgets_retrieve_current_temperature failed\n"); snprintf(p->text_output, MAX_TEXT_OUTPUT_LEN, "gadgets_retrieve_current_temperature failed"); p->double_output[0] = 0; |