You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
457 B
33 lines
457 B
10 years ago
|
package mightypork.gamecore.resources;
|
||
|
|
||
|
|
||
|
import mightypork.gamecore.util.math.Calc;
|
||
|
|
||
|
|
||
|
public class Profiler {
|
||
|
|
||
|
public static long begin()
|
||
|
{
|
||
|
return System.currentTimeMillis();
|
||
|
}
|
||
|
|
||
|
|
||
|
public static double end(long begun)
|
||
|
{
|
||
|
return endLong(begun) / 1000D;
|
||
|
}
|
||
|
|
||
|
|
||
|
public static long endLong(long begun)
|
||
|
{
|
||
|
return System.currentTimeMillis() - begun;
|
||
|
}
|
||
|
|
||
|
|
||
|
public static String endStr(long begun)
|
||
|
{
|
||
|
return Calc.toString(end(begun)) + " s";
|
||
|
}
|
||
|
|
||
|
}
|