Files
MCCustomSkinLoader/Common/customskinloader/utils/TimeUtil.java
T
xfl03 5c12463c94 Revision 14
Local skin supported
Local profile cache supported
Better profile cache
Swifter official profile loading
Better skull loading
Fix legacy loading bug
Fix bug while using ClassTransformer
2016-07-31 22:00:46 +08:00

18 lines
466 B
Java

package customskinloader.utils;
public class TimeUtil {
public static long getCurrentUnixTimestamp(){
return System.currentTimeMillis()/1000l;
}
public static long getUnixTimestamp(long offset){
return getCurrentUnixTimestamp()+offset;
}
public static long getUnixTimestampRandomDelay(long offset){
return getCurrentUnixTimestamp()+offset+random(0,5);
}
private static int random(int min,int max){
return (int)(Math.random()*(max-min+1))+min;
}
}