Files
SimplifyTools/src/main/java/hu/ditservices/utils/Math.java
2023-02-17 19:16:54 +01:00

22 lines
607 B
Java

package hu.ditservices.utils;
import java.io.IOException;
public class Math {
public enum Convert {
TICKS,SECONDS,MINUTES,HOURS
}
/**
* Converting time measurement units from one to another.
* @param from The unit FROM you want to convert. Math.Convert
* @param to The unit TO you want to convert. Math.Convert
* @param value An integer which you want to convert.
*/
public static long convert(Convert from, Convert to, int value){
if (from== Convert.SECONDS && to==Convert.TICKS){
return value*20L;
}
return 0;
}
}