Plex/src/main/java/dev/plex/util/TimeUnit.java

24 lines
385 B
Java
Raw Normal View History

2022-02-26 06:24:11 +00:00
package dev.plex.util;
public enum TimeUnit
{
SECOND(1L),
MINUTE(SECOND.get() * 60L),
HOUR(MINUTE.get() * 60L),
DAY(HOUR.get() * 24L),
WEEK(DAY.get() * 7L),
MONTH(DAY.get() * 30L),
YEAR(MONTH.get() * 12L);
private final long time;
TimeUnit(long time)
{
this.time = time;
}
public long get()
{
return time;
}
}