mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Tweak profiler command on bukkit
This commit is contained in:
1 parent
e688e04446
commit
7098d613a0
1 file changed
+11
-3
@@ -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())
|
||||
|
||||
Reference in new issue
Block a user