=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/main.c,v retrieving revision 1.35 retrieving revision 1.36 diff -c -r1.35 -r1.36 *** src/usr.bin/systat/main.c 2007/02/25 18:21:24 1.35 --- src/usr.bin/systat/main.c 2007/04/24 06:32:08 1.36 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.35 2007/02/25 18:21:24 deraadt Exp $ */ /* $NetBSD: main.c,v 1.8 1996/05/10 23:16:36 thorpej Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.36 2007/04/24 06:32:08 tedu Exp $ */ /* $NetBSD: main.c,v 1.8 1996/05/10 23:16:36 thorpej Exp $ */ /*- *************** *** 40,46 **** #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: main.c,v 1.35 2007/02/25 18:21:24 deraadt Exp $"; #endif /* not lint */ #include --- 40,46 ---- #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: main.c,v 1.36 2007/04/24 06:32:08 tedu Exp $"; #endif /* not lint */ #include *************** *** 67,73 **** char *nlistf = NULL; char *memf = NULL; double avenrun[3]; ! u_int naptime = 5; int verbose = 1; /* to report kvm read errs */ int nflag = 0; int ut, hz, stathz; --- 67,73 ---- char *nlistf = NULL; char *memf = NULL; double avenrun[3]; ! double naptime = 5.0; int verbose = 1; /* to report kvm read errs */ int nflag = 0; int ut, hz, stathz; *************** *** 109,117 **** nflag = 1; break; case 'w': ! naptime = (u_int)strtonum(optarg, 1, 1000, &errstr); ! if (errstr) ! errx(1, "interval %s: %s", errstr, optarg); break; default: usage(); --- 109,118 ---- nflag = 1; break; case 'w': ! ! naptime = strtod(optarg, NULL); ! if (naptime < 0.09 || naptime > 1000.0) ! errx(1, "invalid interval: %s", optarg); break; default: usage(); *************** *** 121,129 **** while (argc > 0) { if (isdigit(argv[0][0])) { ! naptime = (u_int)strtonum(argv[0], 1, 1000, &errstr); ! if (errstr) ! naptime = 5; } else { struct cmdtab *p; --- 122,130 ---- while (argc > 0) { if (isdigit(argv[0][0])) { ! naptime = strtod(argv[0], NULL); ! if (naptime < 0.09 || naptime > 1000.0) ! naptime = 5.0; } else { struct cmdtab *p; *************** *** 256,262 **** wrefresh(wnd); move(CMDLINE, 0); refresh(); ! alarm(naptime); } void --- 257,263 ---- wrefresh(wnd); move(CMDLINE, 0); refresh(); ! ualarm(naptime * 1000000, 0); } void