本文整理汇总了Java中net.floodlightcontroller.counter.ICounter.DateSpan类的典型用法代码示例。如果您正苦于以下问题:Java DateSpan类的具体用法?Java DateSpan怎么用?Java DateSpan使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DateSpan类属于net.floodlightcontroller.counter.ICounter包,在下文中一共展示了DateSpan类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dateSpanToMilliseconds
import net.floodlightcontroller.counter.ICounter.DateSpan; //导入依赖的package包/类
/**
* Return a long that is the number of milliseconds in a ds (second/minute/hour/day/week). (Utility method.)
*
* @param ds
* @return
*/
public static final long dateSpanToMilliseconds(DateSpan ds) {
long delta = 1;
switch(ds) {
case WEEKS:
delta *= 7;
case DAYS:
delta *= 24;
case HOURS:
delta *= 60;
case MINUTES:
delta *= 60;
case SECONDS:
delta *= 1000;
default:
break;
}
return delta;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:25,代码来源:CountSeries.java
示例2: CountBuffer
import net.floodlightcontroller.counter.ICounter.DateSpan; //导入依赖的package包/类
public CountBuffer(Date startDate, DateSpan dateSpan, int seriesLength) {
this.seriesLength = seriesLength;
this.counterValues = new long[seriesLength];
this.dateSpan = dateSpan;
this.startDate = startDate;
this.currentIndex = 0;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:9,代码来源:CountBuffer.java
示例3: CountSeries
import net.floodlightcontroller.counter.ICounter.DateSpan; //导入依赖的package包/类
public CountSeries(Date startDate, DateSpan dateSpan, long[] counterValues) {
this.counterValues = counterValues.clone();
this.dateSpan = dateSpan;
this.startDate = startDate;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:6,代码来源:CountSeries.java