    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import java.util.concurrent.Callable;
    006    import net.minecraft.client.Minecraft;
    007
    008    @SideOnly(Side.CLIENT)
    009    public class CallableClientProfiler implements Callable
    010    {
    011        /** Reference to the Minecraft object. */
    012        final Minecraft mc;
    013
    014        public CallableClientProfiler(Minecraft par1Minecraft)
    015        {
    016            this.mc = par1Minecraft;
    017        }
    018
    019        /**
    020         * Gets if Client Profiler (aka Snooper) is enabled.
    021         */
    022        public String getClientProfilerEnabled()
    023        {
    024            return this.mc.mcProfiler.profilingEnabled ? this.mc.mcProfiler.getNameOfLastSection() : "N/A (disabled)";
    025        }
    026
    027        public Object call()
    028        {
    029            return this.getClientProfilerEnabled();
    030        }
    031    }