[BACK]Return to vmstat.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / vmstat

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/vmstat/vmstat.c between version 1.29 and 1.30

version 1.29, 1996/05/10 23:19:32 version 1.30, 1996/06/05 00:18:58
Line 346  choosedrives(argv)
Line 346  choosedrives(argv)
 long  long
 getuptime()  getuptime()
 {  {
         static time_t now, boottime;          static time_t now;
           static struct timeval boottime;
         time_t uptime;          time_t uptime;
   
         if (boottime == 0)          if (boottime.tv_sec == 0)
                 kread(X_BOOTTIME, &boottime, sizeof(boottime));                  kread(X_BOOTTIME, &boottime, sizeof(boottime));
         (void)time(&now);          (void)time(&now);
         uptime = now - boottime;          uptime = now - boottime.tv_sec;
         if (uptime <= 0 || uptime > 60*60*24*365*10) {          if (uptime <= 0 || uptime > 60*60*24*365*10) {
                 (void)fprintf(stderr,                  (void)fprintf(stderr,
                     "vmstat: time makes no sense; namelist must be wrong.\n");                      "vmstat: time makes no sense; namelist must be wrong.\n");

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

CVSweb <webmaster@jp.NetBSD.org>