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)
{
int c;
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();
......@@ -290,7 +291,7 @@ main(int argc, char * const *argv)
exit(0);
case 'w':
do_repeat = 1;
delay = atoi(optarg);
delay = atof(optarg);
break;
case 'x':
xml = 1;
......@@ -332,7 +333,7 @@ main(int argc, char * const *argv)
// end of output block marker.
printf("\n");
sleep(delay);
usleep(delay * 1e6);
}
exit(0);
}
......@@ -35,4 +35,4 @@
#include "vas.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)
}
void
do_curses(struct VSM_data *vd, int delay)
do_curses(struct VSM_data *vd, double delay)
{
struct pollfd pollfd;
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