ofproto: Display idle time in bridge/dump-flows.
authorEthan Jackson <ethan@nicira.com>
Sat, 12 Feb 2011 00:03:26 +0000 (16:03 -0800)
committerEthan Jackson <ethan@nicira.com>
Fri, 18 Feb 2011 19:24:22 +0000 (11:24 -0800)
ofproto/ofproto.c

index 31c8b6210e2f1dbddab9fae028433f8afa12c6af..90f97104058e3d2bbcc4afbb5414e45981da9bb5 100644 (file)
@@ -3664,6 +3664,7 @@ flow_stats_ds(struct ofproto *ofproto, struct rule *rule, struct ds *results)
 
     ds_put_format(results, "duration=%llds, ",
                   (time_msec() - rule->created) / 1000);
+    ds_put_format(results, "idle=%.3fs, ", (time_msec() - rule->used) / 1000.0);
     ds_put_format(results, "priority=%u, ", rule->cr.priority);
     ds_put_format(results, "n_packets=%"PRIu64", ", packet_count);
     ds_put_format(results, "n_bytes=%"PRIu64", ", byte_count);