[ONOS-4931] fix doc of FlowEntry.life(), add life(TimeUnit)

Fix the doc: life() returns the time in seconds, not milliseconds.

Add new method life(TimeUnit) that allows specifying the timeunit to
receive the life value as as seconds might not be enough for
all applications and OpenFlow can provide this value to nanoseconds resolution
(in its spec).

Change-Id: Ia6a7573797249e0edc04e03c7204a550a2823742
diff --git a/core/api/src/main/java/org/onosproject/net/flow/FlowEntry.java b/core/api/src/main/java/org/onosproject/net/flow/FlowEntry.java
index 019d3be..1511d21 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/FlowEntry.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/FlowEntry.java
@@ -16,6 +16,8 @@
 package org.onosproject.net.flow;
 
 
+import java.util.concurrent.TimeUnit;
+
 /**
  * Represents a generalized match & action pair to be applied to
  * an infrastucture device.
@@ -60,13 +62,20 @@
     FlowEntryState state();
 
     /**
-     * Returns the number of milliseconds this flow rule has been applied.
+     * Returns the number of seconds this flow rule has been applied.
      *
-     * @return number of millis
+     * @return number of seconds
      */
     long life();
 
     /**
+     * Returns the time this flow rule has been applied.
+     *
+     * @return time in the requested {@link TimeUnit}
+     */
+    long life(TimeUnit unit);
+
+    /**
      * Returns the number of packets this flow rule has matched.
      *
      * @return number of packets