Tweak profiler command on bukkit

This commit is contained in:
Christian 2012-06-28 08:21:24 -04:00
parent e688e04446
commit 7098d613a0
1 changed files with 11 additions and 3 deletions

View File

@ -25,13 +25,21 @@ public class FMLBukkitProfiler {
public static long beginProfiling(int seconds)
{
long now = System.currentTimeMillis();
if (lastInstance == null)
{
lastInstance = new FMLBukkitProfiler();
FMLBukkitHandler.instance().profiler = lastInstance;
endTime = System.currentTimeMillis() + seconds;
endTime = now + seconds;
}
if (endTime > now)
{
return endTime - now;
}
else
{
return 0;
}
return endTime - System.currentTimeMillis();
}
public static long endProfiling()
@ -69,7 +77,7 @@ public class FMLBukkitProfiler {
{
if (lastInstance == null)
{
return new String[0];
return new String[] { "No profile data available" };
}
if (endTime > System.currentTimeMillis())