From 384df2da48add772a57d445602ea784f8103a8a3 Mon Sep 17 00:00:00 2001 From: nifi Date: Fri, 24 Sep 2010 05:54:04 +0000 Subject: [PATCH] Use 0 if no shortest inter-packet time is available --- .../src/se/sics/contiki/collect/SensorDataAggregator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java b/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java index 09a1e888f..98da6bd59 100644 --- a/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java +++ b/examples/sky-shell/src/se/sics/contiki/collect/SensorDataAggregator.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: SensorDataAggregator.java,v 1.8 2010/09/21 20:24:18 nifi Exp $ + * $Id: SensorDataAggregator.java,v 1.9 2010/09/24 05:54:04 nifi Exp $ * * ----------------------------------------------------------------- * @@ -34,8 +34,8 @@ * * Authors : Joakim Eriksson, Niclas Finne * Created : 20 aug 2008 - * Updated : $Date: 2010/09/21 20:24:18 $ - * $Revision: 1.8 $ + * Updated : $Date: 2010/09/24 05:54:04 $ + * $Revision: 1.9 $ */ package se.sics.contiki.collect; @@ -307,7 +307,7 @@ public class SensorDataAggregator implements SensorInfo { } public long getShortestPeriod() { - return shortestPeriod; + return shortestPeriod < Long.MAX_VALUE ? shortestPeriod : 0; } public long getLongestPeriod() {