@Test public void testFlooredNaturalTime() { int time = (int) (System.currentTimeMillis() / 1000); int windowFlooredNaturalTime = TimeUtils.getWindowFlooredNaturalTime(time, 3600); assertEquals((time / 3600) * 3600, windowFlooredNaturalTime); }
public static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds) { return ((timeInSeconds / bucketInSeconds) * bucketInSeconds); }
TimeUtils { public static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds) { return ((timeInSeconds / bucketInSeconds) * bucketInSeconds); } }
TimeUtils { public static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds) { return ((timeInSeconds / bucketInSeconds) * bucketInSeconds); } private  TimeUtils(); }
TimeUtils { public static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds) { return ((timeInSeconds / bucketInSeconds) * bucketInSeconds); } private  TimeUtils(); static int getTimeBucket(TimeUnit unit, long timestamp, int bucketSizeInSeconds); static int getWindowFlooredBinaryTime(TimeUnit unit, long timestamp, int windowSizeInSeconds); static int timeToSeconds(TimeUnit unit, long time); static int timeToMilliSeconds(TimeUnit unit, long time); static long timeToNanoSeconds(TimeUnit unit, long time); static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds); static long getTimeFromBucketString(String hexTimeInSeconds); static long getTimeFromBucketString(int timeInSeconds); }
TimeUtils { public static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds) { return ((timeInSeconds / bucketInSeconds) * bucketInSeconds); } private  TimeUtils(); static int getTimeBucket(TimeUnit unit, long timestamp, int bucketSizeInSeconds); static int getWindowFlooredBinaryTime(TimeUnit unit, long timestamp, int windowSizeInSeconds); static int timeToSeconds(TimeUnit unit, long time); static int timeToMilliSeconds(TimeUnit unit, long time); static long timeToNanoSeconds(TimeUnit unit, long time); static int getWindowFlooredNaturalTime(int timeInSeconds, int bucketInSeconds); static long getTimeFromBucketString(String hexTimeInSeconds); static long getTimeFromBucketString(int timeInSeconds);  }