Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AndroidDevMetrics tracing
@Override
protected void onResume() {
super.onResume();
countToMillion();
callHeavyMethod();
}
private void countToMillion() {
int number = 0;
for (int i = 0; i < 1000000; i++) {
number += i;
}
Log.d("SplashActivity", "Sum: " + number);
}
private void callHeavyMethod() {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.