[BACK]Return to pf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / systat

Diff for /src/usr.bin/systat/pf.c between version 1.8 and 1.9

version 1.8, 2016/01/02 20:03:28 version 1.9, 2017/06/01 14:38:28
Line 220 
Line 220 
 print_pf(void)  print_pf(void)
 {  {
         char            *debug;          char            *debug;
         time_t          tm;          time_t          tm = 0;
           struct timespec uptime;
         int             i;          int             i;
         struct pf_status *s = &status;          struct pf_status *s = &status;
   
Line 229 
Line 230 
         if (end > num_disp)          if (end > num_disp)
                 end = num_disp;                  end = num_disp;
   
         tm = time(NULL) - s->since;          if (!clock_gettime(CLOCK_UPTIME, &uptime))
                   tm = uptime.tv_sec - s->since;
   
         ADD_LINE_S("pf", "Status", s->running ? "Enabled" : "Disabled");          ADD_LINE_S("pf", "Status", s->running ? "Enabled" : "Disabled");
         ADD_LINE_A("pf", "Since", tm);          ADD_LINE_A("pf", "Since", tm);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9