19 package org.sleuthkit.autopsy.timeline.zooming;
21 import java.time.temporal.ChronoUnit;
22 import org.joda.time.Days;
23 import org.joda.time.Hours;
24 import org.joda.time.Minutes;
25 import org.joda.time.Months;
26 import org.joda.time.Period;
27 import org.joda.time.Seconds;
28 import org.joda.time.Years;
33 public enum TimeUnits implements DisplayNameProvider {
36 YEARS(Years.ONE.toPeriod(), ChronoUnit.YEARS),
37 MONTHS(Months.ONE.toPeriod(), ChronoUnit.MONTHS),
38 DAYS(Days.ONE.toPeriod(), ChronoUnit.DAYS),
39 HOURS(Hours.ONE.toPeriod(), ChronoUnit.HOURS),
40 MINUTES(Minutes.ONE.toPeriod(), ChronoUnit.MINUTES),
41 SECONDS(Seconds.ONE.toPeriod(), ChronoUnit.SECONDS);
74 private final Period
p;
76 private final ChronoUnit
cu;
ChronoUnit getChronoUnit()
TimeUnits(Period p, ChronoUnit cu)
static TimeUnits fromChronoUnit(ChronoUnit chronoUnit)