+/*
+ * Sets different-than-default (1 sec.) polling interval for polling-active
+ * modes, from interval <0.1;86400> seconds.
+ * poll_delay is natively in tenths of second.
+ */
+void polling_interval()
+{
+ unsigned char message[256];
+ int c = 0;
+
+ noecho();
+ print_help(POLL_HELP);
+
+ while (1) {
+ sprintf(message, _("%s%u"), POLL_I, poll_delay);
+ mvwaddstr(main_sub, 0, 0, message);
+ sprintf(message, _("(%0.1f seconds)"), (float) poll_delay / 10);
+ mvwaddstr(main_sub, 1, strlen(POLL_I), message);
+ wrefresh(main_sub);
+ c = getch();
+ switch (c) {
+ case 'P':
+ case 'p':
+ get_value(message, 0, strlen(POLL_I), 7, INT_STRING, 1, 864000,
+ POLL_HELP);
+ poll_delay = atoi(message);
+ clear_main_new(0, 2);
+ break;
+ case 'Q':
+ case 'q':
+ goto quit;
+ }
+ }
+
+quit:
+ print_help("");
+ clear_main(0);
+ return;
+}
+