Created
December 19, 2015 13:43
-
-
Save ElFeesho/dfb8aab78bf9d52c1d54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.SystemClock; | |
import android.util.Log; | |
public class ProfileLog { | |
private static final long startTime = SystemClock.uptimeMillis(); | |
public static void tick() | |
{ | |
StackTraceElement stackTraceElement = new Exception().getStackTrace()[1]; | |
Log.i("ProfileLog", (SystemClock.uptimeMillis()-startTime)+ "ms at "+ stackTraceElement.getClassName()+" - " +stackTraceElement.getMethodName()+":"+stackTraceElement.getLineNumber()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment