Commit 765124a8 authored by Nils Goroll's avatar Nils Goroll Committed by Lasse Karstensen

make the update interval a double to allow values < 1

parent 1c4e35f8
...@@ -273,7 +273,8 @@ main(int argc, char * const *argv) ...@@ -273,7 +273,8 @@ main(int argc, char * const *argv)
{ {
int c; int c;
struct VSM_data *vd; struct VSM_data *vd;
int delay = 1, once = 0, xml = 0, json = 0, do_repeat = 0, f_list = 0; double delay = 1.0;
int once = 0, xml = 0, json = 0, do_repeat = 0, f_list = 0;
vd = VSM_New(); vd = VSM_New();
...@@ -290,7 +291,7 @@ main(int argc, char * const *argv) ...@@ -290,7 +291,7 @@ main(int argc, char * const *argv)
exit(0); exit(0);
case 'w': case 'w':
do_repeat = 1; do_repeat = 1;
delay = atoi(optarg); delay = atof(optarg);
break; break;
case 'x': case 'x':
xml = 1; xml = 1;
...@@ -332,7 +333,7 @@ main(int argc, char * const *argv) ...@@ -332,7 +333,7 @@ main(int argc, char * const *argv)
// end of output block marker. // end of output block marker.
printf("\n"); printf("\n");
sleep(delay); usleep(delay * 1e6);
} }
exit(0); exit(0);
} }
...@@ -35,4 +35,4 @@ ...@@ -35,4 +35,4 @@
#include "vas.h" #include "vas.h"
#include "vcs.h" #include "vcs.h"
void do_curses(struct VSM_data *vd, int delay); void do_curses(struct VSM_data *vd, double delay);
...@@ -908,7 +908,7 @@ handle_keypress(int ch) ...@@ -908,7 +908,7 @@ handle_keypress(int ch)
} }
void void
do_curses(struct VSM_data *vd, int delay) do_curses(struct VSM_data *vd, double delay)
{ {
struct pollfd pollfd; struct pollfd pollfd;
long t; long t;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment