Example usage for org.joda.time Chronology millisOfSecond

List of usage examples for org.joda.time Chronology millisOfSecond

Introduction

In this page you can find the example usage for org.joda.time Chronology millisOfSecond.

Prototype

public abstract DateTimeField millisOfSecond();

Source Link

Document

Get the millis of second field for this chronology.

Usage

From source file:com.arpnetworking.kairosdb.aggregators.MovingWindowAggregator.java

License:Apache License

private DateTimeField timeUnitToTimeField(final TimeUnit timeUnit) {
    final Chronology chronology = GregorianChronology.getInstance(_timeZone);
    switch (timeUnit) {
    case YEARS:/*  w w  w . j  av  a  2 s  . c  o m*/
        return chronology.year();
    case MONTHS:
        return chronology.monthOfYear();
    case WEEKS:
        return chronology.weekOfWeekyear();
    case DAYS:
        return chronology.dayOfMonth();
    case HOURS:
        return chronology.hourOfDay();
    case MINUTES:
        return chronology.minuteOfHour();
    case SECONDS:
        return chronology.secondOfDay();
    default:
        return chronology.millisOfSecond();
    }
}